Skip to content

Conversation

@ashley-taylor
Copy link
Contributor

This pull request adds Java 17 test support.
This will allow adding support for features like Java records without requiring an update to the Maven build.

This change added tests and can be verified as follows:

This adds a test that if a @AvroEncode is specified on a Java record, it works correctly.

@github-actions github-actions bot added Java Pull Requests for Java binding build labels Jul 4, 2025
@ashley-taylor
Copy link
Contributor Author

Hi @opwvhk and @martin-g, you have both helped me get PRs merged in the past. Would you be available to help me with this?
Also have another PR #3425

My goal is to get Java Record support in Avro. Splitting out my old PR into several smaller PRs to make this process easier.

<pluginExecutionFilter>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<versionRange>[0,)</versionRange>
Copy link
Member

Choose a reason for hiding this comment

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

This change is not related to the PR.
I'd prefer to be in a separate PR but the Java team might be OK...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.
Will move to standalone PR

<pluginExecutionFilter>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
<versionRange>[0,)</versionRange>
Copy link
Member

Choose a reason for hiding this comment

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

Same

assertEquals("test used this", read.getR1().value());
}

public static class Wrapper {
Copy link
Member

Choose a reason for hiding this comment

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

Why is this class needed ?
Isn't it possible to put @AvroEncode(using = R1Encoding.class) directly on the record class itself ?
Disclaimer: I haven't used Java (in general, not only the Avro Java SDK) for several years now.

Copy link
Member

Choose a reason for hiding this comment

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

@ashley-taylor
Copy link
Contributor Author

@martin-g made suggestions. Is there anyone I should ping to review the Java side?
Thanks.

@opwvhk opwvhk merged commit 99a002d into apache:main Jul 18, 2025
9 checks passed
opwvhk pushed a commit to opwvhk/avro that referenced this pull request Sep 5, 2025
* AVRO-4163: add java 17 test module.

* mis click

* remove changes from pom.xml

PR feedback
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Java Pull Requests for Java binding

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants