[java] Improve resilience to broken classpath#3270
Merged
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.
5 tasks
adangel
reviewed
May 13, 2021
| import net.sourceforge.pmd.lang.java.symbols.internal.asm.Classpath; | ||
|
|
||
| /** | ||
| * For this test we exclude SuperItf.class from the {@link Classpath} |
adangel
approved these changes
May 13, 2021
adangel
left a comment
Member
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 verifypasses (checked automatically by github actions)