Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Isolate Avro schema code generation when using multiple schema files #39345

Merged
merged 1 commit into from
Mar 18, 2024
Merged
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 @@ -26,8 +26,6 @@ public abstract class AvroCodeGenProviderBase implements CodeGenProvider {

private static final Logger log = Logger.getLogger(AvroCodeGenProviderBase.class);

public static final String[] EMPTY = new String[0];

/**
* The directory (within the java classpath) that contains the velocity
* templates to use for code generation.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ void compileSingleFile(Path filePath,
// allow them to share a single schema so reuse and sharing of schema
// is possible.
try {
if (options.imports == EMPTY) {
if (options.imports == null || options.imports.length == 0) {
schema = new Schema.Parser().parse(file);
} else {
schema = schemaParser.parse(file);
Expand Down
Loading