Skip to content

Commit 1e85c8c

Browse files
jeffreyameyerclaude
andcommitted
Fix smoke test: stay on the EdtfTemporal interface
The previous Smoke.java called i.upper() on a variable typed as EdtfTemporal, but upper() is declared on EdtfInterval (the permitted subtype) — not on the sealed interface. The compiler rejected this with 'cannot find symbol' against the published 0.2.0 jar, breaking the smoke workflow. Replace the upper-endpoint inspection with a type() call so the smoke source stays on the EdtfTemporal-only API surface, which is stable across all releases since 0.2.0. The build.xml assertion list adds a corresponding 'interval type: INTERVAL' substring check so the smoke still verifies the interval parsed correctly. Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 6dd194b commit 1e85c8c

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

smoke/build.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
<contains string="${smoke.stdout}" substring="canonical: 2020-05-15"/>
6060
<contains string="${smoke.stdout}" substring="type: DATE"/>
6161
<contains string="${smoke.stdout}" substring="interval canonical: 2020/.."/>
62+
<contains string="${smoke.stdout}" substring="interval type: INTERVAL"/>
6263
</and>
6364
</condition>
6465
<fail unless="smoke.passed"

smoke/src/Smoke.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@ public static void main(String[] args) {
2323
// Cover an interval too.
2424
EdtfTemporal i = Edtf.parse("2020/..");
2525
System.out.println("interval canonical: " + i.toEdtfString());
26-
System.out.println("interval upper-open: " + i.upper().getClass().getSimpleName());
26+
System.out.println("interval type: " + i.type());
2727
}
2828
}

0 commit comments

Comments
 (0)