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

WIP, DONT MERGE #1088

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Conversation

trancexpress
Copy link
Contributor

Fixes: #1081

What it does

How to test

Author checklist

Fixes: eclipse-jdt#1081
Signed-off-by: Simeon Andreev <simeon.danailov.andreev@gmail.com>
@trancexpress
Copy link
Contributor Author

@jukzi one thing that remains the same is the LookupEnvironment.

I'm not sure this is the right fix, but lets see what the tests have to say.

I'm also not sure how we want to test this, as commented on #1081 so far I can reproduce the stack overflow only with an unbound classpath container. Will have to check how to specify an unbound container during tests...

@@ -148,6 +149,8 @@ public class LookupEnvironment implements ProblemReasons, TypeConstants {

public String moduleVersion; // ROOT_ONLY

private final Set<String> acceptingSourceFiles = new HashSet<>();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i don't know about the lifetime of LookupEnvironment., but i guess at least it should be cleared on reset()

} catch (AbortCompilation abort) {
if (CharOperation.equals(name, TypeConstants.PACKAGE_INFO_NAME))
return null; // silently, requestor may not be able to handle compilation units (HierarchyResolver)
throw abort;
} finally {
this.acceptingSourceFiles.remove(fileName);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need to remove only if added?

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.

StackOverflowError on resolving static import
2 participants