Skip to content

Make ClassFile parsing of super-name more robust - #160

Merged
mcculls merged 1 commit into
mainfrom
mcculls/allow-jlo-classfile
Oct 30, 2026
Merged

mcculls merged 1 commit into
mainfrom
mcculls/allow-jlo-classfile

Conversation

@mcculls

@mcculls mcculls commented Oct 30, 2026

Copy link
Copy Markdown
Collaborator

What Does This Do

Handle a zero super_class index when parsing class headers and outlines, returning a null superclass for java.lang.Object and modules. Update the ClassHeader.superName documentation and add regression tests for Object, module descriptors, and module descriptors with ACC_SYNTHETIC.

Motivation

The previous superclass lookup did not handle java.lang.Object, and its exact access-flag comparison only recognized modules without additional flags. Checking the superclass offset handles both cases.

Additional Notes

Validation: ./gradlew :class-match:check --no-configuration-cache passed, including tests on Java 8, 11, 17, 21, and 25, formatting, and SpotBugs. Configuration caching was disabled to work around a Spotless configuration-cache serialization error.

Contributor Checklist

Jira ticket: not provided.

@mcculls mcculls changed the title Handle zero superclass indices in ClassFile parsing Make ClassFile parsing of super-name more robust Oct 30, 2026
@mcculls
mcculls force-pushed the mcculls/allow-jlo-classfile branch from 5d4ff4a to bb10aee Compare October 30, 2026 12:19
@mcculls
mcculls marked this pull request as ready for review October 30, 2026 12:19
@mcculls
mcculls requested a review from a team as a code owner October 30, 2026 12:19
@mcculls
mcculls requested review from sarahchen6 and removed request for a team October 30, 2026 12:19

@sarahchen6 sarahchen6 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

👍

@mcculls
mcculls merged commit aa81a35 into main Oct 30, 2026
6 checks passed
@mcculls
mcculls deleted the mcculls/allow-jlo-classfile branch October 30, 2026 13:29
@github-actions github-actions Bot added this to the 0.1.0 milestone Oct 30, 2026
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.

2 participants