Skip to content

COMPRESS-736: Check all pass rules in PackingOptions.isPassFile() - #847

Open
Marti2203 wants to merge 1 commit into
apache:masterfrom
Marti2203:pack200-pass-file-rules
Open

Marti2203 wants to merge 1 commit into
apache:masterfrom
Marti2203:pack200-pass-file-rules

Conversation

@Marti2203

Copy link
Copy Markdown

Fixes COMPRESS-736.

PackingOptions.isPassFile(String) returned the result of the first directory rule (a pass entry not ending in .class) even when it did not match, so later exact or directory rules were never checked. This returns true on a match and otherwise continues with the next rule.

PackingOptionsTest.testIsPassFileChecksAllRules fails without the change and passes with it; PackingOptionsTest and mvn -B -DskipTests -DskipITs pass.

This issue was found by an LLM-Enhanced Static Analysis Engine and verified manually. The patch and this description were prepared with AI assistance (Claude Code) and reviewed by me; the commit carries an Assisted-By: trailer.

isPassFile() returned the result of the first directory rule, so a
directory rule that does not match hid all later rules. Return true on
a match and otherwise go on to the next rule.

Assisted-By: Claude Code:claude-opus-5-5
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.

1 participant