Skip to content

AVRO-4176: Java parser allows field type to be object with custom type#3772

Merged
opwvhk merged 2 commits into
apache:mainfrom
opwvhk:avro-4176-disallow-named-type-alteration
May 15, 2026
Merged

AVRO-4176: Java parser allows field type to be object with custom type#3772
opwvhk merged 2 commits into
apache:mainfrom
opwvhk:avro-4176-disallow-named-type-alteration

Conversation

@opwvhk
Copy link
Copy Markdown
Contributor

@opwvhk opwvhk commented May 10, 2026

What is the purpose of the change

This PR fixes AVRO-4176: Java parser allows field type to be object with custom type.

Verifying this change

The description of the bug points to the change in Schema.java, and a test was added to TestSchema to prove the fix.

The change in TestUnionSelfReference was needed because it contained the same bug as mentioned in the Jira issue: it used {"type": "Node"} as a type reference.

Documentation

  • Does this pull request introduce a new feature? (yes / no)
  • If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)

opwvhk added 2 commits May 10, 2026 21:54
The test cases for self reference unions contained a bug that seemed to
make the parsing bug necessary.
@github-actions github-actions Bot added the Java Pull Requests for Java binding label May 10, 2026
@opwvhk opwvhk merged commit 22f53c8 into apache:main May 15, 2026
9 checks passed
@opwvhk opwvhk deleted the avro-4176-disallow-named-type-alteration branch May 15, 2026 16:55
opwvhk added a commit that referenced this pull request May 15, 2026
#3772)

* AVRO-4176: Disallow named type alteration

The test cases for self reference unions contained a bug that seemed to
make the parsing bug necessary.

* AVRO-4176: Add test

(cherry picked from commit 22f53c8)
@opwvhk
Copy link
Copy Markdown
Contributor Author

opwvhk commented May 15, 2026

Cherry-picked to 1.12

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

Labels

Java Pull Requests for Java binding

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant