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

camel-jackson-avro data format native support #2754

Merged
merged 2 commits into from Jun 9, 2021

Conversation

jamesnetherton
Copy link
Contributor

No description provided.

Comment on lines 131 to 134
InputStream resource = JacksonAvroResource.class.getResourceAsStream(schemaPath);
Schema raw = new Schema.Parser().setValidate(true).parse(resource);
AvroSchema schema = new AvroSchema(raw);
return ex -> schema;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
InputStream resource = JacksonAvroResource.class.getResourceAsStream(schemaPath);
Schema raw = new Schema.Parser().setValidate(true).parse(resource);
AvroSchema schema = new AvroSchema(raw);
return ex -> schema;
try (InputStream resource = JacksonAvroResource.class.getResourceAsStream(schemaPath)) {
Schema raw = new Schema.Parser().setValidate(true).parse(resource);
AvroSchema schema = new AvroSchema(raw);
return ex -> schema;
}

Copy link
Contributor

@ppalaga ppalaga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A nitpick inline, otherwise looks good!

@jamesnetherton
Copy link
Contributor Author

A nitpick inline, otherwise looks good!

Thanks - applied also to the jackson-protobuf test.

@jamesnetherton jamesnetherton merged commit 2ec6ab7 into apache:main Jun 9, 2021
@jamesnetherton jamesnetherton deleted the jackson-avro-native branch June 9, 2021 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants