Skip to content

Ignore JVM array descriptors when packaging HiveMQ extensions#11928

Open
sci-jvm-study wants to merge 1 commit into
testcontainers:mainfrom
sci-jvm-study:fix-hivemq-array-descriptor
Open

Ignore JVM array descriptors when packaging HiveMQ extensions#11928
sci-jvm-study wants to merge 1 commit into
testcontainers:mainfrom
sci-jvm-study:fix-hivemq-array-descriptor

Conversation

@sci-jvm-study

Copy link
Copy Markdown

What does this PR do?

Fixes #10074.

'HiveMQExtension' currently ignores only object array descriptors ('[L') when collecting classes from Javassist's constant pool.

However, 'ConstPool#getClassNames()' may also return primitive array descriptors such as '[B'. These are JVM descriptors rather than fully qualified class names, so passing them to 'JavaArchive.addClass(String)' results in a 'PatternSyntaxException'.

This change ignores all JVM array descriptors by checking for '[' instead of only '[L'.

Changes

  • Ignore all JVM array descriptors returned from the constant pool when packaging additional classes
  • Add a regression test covering a primitive array descriptor ('[B')
  • Add a helper test class that generates a primitive array descriptor in the constant pool

Testing

  • Reproduced the reported 'PatternSyntaxException' before the fix
  • Verified that the regression test fails with the original implementation
  • Verified that the regression test passes after the fix

@sci-jvm-study sci-jvm-study requested a review from a team as a code owner July 15, 2026 10:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: HiveMQExtension / Class Loading Issue

1 participant