-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[java] Improve resilience to broken classpath #3270
Conversation
previously this test was ill-posed. We had an unresolved List type, and also, had a type param <S extends List<S>> which is an unsatisfiable recursive bound.
Generated by 🚫 Danger |
Since we have the classpath abstraction, we can just mask off some class files to get a broken classpath for use in tests.
import net.sourceforge.pmd.lang.java.symbols.internal.asm.Classpath; | ||
|
||
/** | ||
* For this test we exclude SuperItf.class from the {@link Classpath} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good idea 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just for future reference: In the regression tester output, it is visible that the errors are removed (for spring, there were 965 errors). So this PR works.
In the latest report, these errors don't appear anymore as removed, because #3269 fixed the classpath issue for the regression tester. This means, that the classpath is now complete again.
Describe the PR
Relax some of the checks on well-formed types in the type resolution codebase. There will probably be bugs left since everything was written assuming all types are well formed.
This should fix the 400+ AssertionErrors of the regression tester on spring sources (its classpath is incomplete, and we should also fix it in our project-list.xml)
Related issues
Ready?
./mvnw clean verify
passes (checked automatically by github actions)