Skip to content

Commit

Permalink
Update SchemaTypeSystemCompiler.java
Browse files Browse the repository at this point in the history
  • Loading branch information
pjfanning committed Jun 18, 2024
1 parent bd3418d commit 92b4930
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -373,14 +373,14 @@ public static boolean generateTypes(SchemaTypeSystem system, Filer filer, XmlOpt
types.addAll(Arrays.asList(system.attributeTypes()));


SchemaCodePrinter printer = (options == null) ? null : options.getSchemaCodePrinter();
SchemaCodePrinter printer = options == null ? null : options.getSchemaCodePrinter();
if (printer == null) {
printer = new SchemaTypeCodePrinter();
}

String indexClassName = SchemaTypeCodePrinter.indexClassForSystem(system);

try (Writer out = filer.createSourceFile(indexClassName, (options == null) ? null : options.getCompileSourceCodeEncoding())) {
try (Writer out = filer.createSourceFile(indexClassName, options == null ? null : options.getCompileSourceCodeEncoding())) {
Repackager repackager = (filer instanceof FilerImpl) ? ((FilerImpl) filer).getRepackager() : null;
printer.printHolder(out, system, options, repackager);
} catch (IOException e) {
Expand All @@ -398,7 +398,7 @@ public static boolean generateTypes(SchemaTypeSystem system, Filer filer, XmlOpt

String fjn = type.getFullJavaName();

try (Writer writer = filer.createSourceFile(fjn, (options == null) ? null : options.getCompileSourceCodeEncoding())) {
try (Writer writer = filer.createSourceFile(fjn, options == null ? null : options.getCompileSourceCodeEncoding())) {
// Generate interface class
printer.printType(writer, type, options);
} catch (IOException e) {
Expand All @@ -408,7 +408,7 @@ public static boolean generateTypes(SchemaTypeSystem system, Filer filer, XmlOpt

fjn = type.getFullJavaImplName();

try (Writer writer = filer.createSourceFile(fjn, (options == null) ? null : options.getCompileSourceCodeEncoding())) {
try (Writer writer = filer.createSourceFile(fjn, options == null ? null : options.getCompileSourceCodeEncoding())) {
// Generate Implementation class
printer.printTypeImpl(writer, type, options);
} catch (IOException e) {
Expand Down

0 comments on commit 92b4930

Please sign in to comment.