Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,9 @@ export class JavaLegacyDateTimeProvider extends JavaDateTimeProvider {
});
},
);
this._renderer.emitLine("return null;");
this._renderer.emitLine(
'throw new IllegalArgumentException("Unparseable date: " + str);',
);
},
);

Expand Down
12 changes: 9 additions & 3 deletions test/languages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -246,9 +246,15 @@ export const JavaLanguage: Language = {
skipMiscJSON: false,
skipSchema: ["optional-property.schema"],
rendererOptions: {},
// The default is array-type=list; this keeps the T[] code path
// covered.
quickTestRendererOptions: [{ "array-type": "array" }],
quickTestRendererOptions: [
// The default is array-type=list; this keeps the T[] code path
// covered.
{ "array-type": "array" },
// CI runs schema-java, not schema-java-datetime-legacy: this runs
// the legacy provider's date and time parsing, including the
// expected-failure sample.
["optional-date-time.schema", { "datetime-provider": "legacy" }],
],
sourceFiles: ["src/language/Java/index.ts"],
};

Expand Down