Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EnforceBytecodeVersion: check if the package name is valid #240

Open
aalmiray opened this issue Dec 6, 2022 · 0 comments
Open

EnforceBytecodeVersion: check if the package name is valid #240

aalmiray opened this issue Dec 6, 2022 · 0 comments

Comments

@aalmiray
Copy link

aalmiray commented Dec 6, 2022

Apply a regex such as "^[a-z]+(.[a-z][a-z0-9])$" to check if a given classfile entry has a valid package name. Actual regex may account for uppercase characters and _ which is also valid.

The gradle-api-* JARs do not follow the MR-JAR constraints and contain entries such as org/gradle/internal/impldep/META-INF/versions/9/org/junit/platform/commons/util/ModuleUtils.class which cannot be loaded as their package name is invalid. Entries like this should not be scanned.

This particular JAR has issues (see gradle/gradle#23002) yet the fact remains that other faulty JARs may exist out there with entries that could never be loaded (unless a weird force is attempted) and thus should not cause the rul to trigger.

Related to kordamp/enforcer-gradle-plugin#27

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

No branches or pull requests

1 participant