Community
Participate
Working Groups
Created attachment 115167 [details] .metadata/.log file This is on Eclipse Platform Build id: M20080911-1700 I have a class called "AqtiumNode" (in package "node"), which has many static methods called "node" which take different arguments. If, in another class, I have import static node.AqtiumNode.*; then everything is fine. However, if I type import static node.AqtiumNode.node; then immediately I get a pop-up window "An Internal Error has occured 'Requesting Java AST from Selection'" and a pop-up window "Internal Error" recommending that I exit the workbench. Looking in the .log file in .metadata, I see that it's a stack overflow. A sample logfile is attached. When this happens, the build fails and most .class files are not written out. Also, in the "problems" pane, a problem shows up for the class in which I type the afflicted line: Description "Other", location "unknown", Type "Java Problem". This has also occured on version 3.3.1.1 on MacOS, and on version 3.2.2 on a PC. Note that I don't get any compile errors. Moreover, if I build outside of eclipse using the same Java version (I think), it runs fine. If this bug is new/important, I can potentially try to reproduce in some self-contained code. As is, the code is fairly proprietary, so I don't want to send the sample code as-is. Please advise. Thanks, Brian
Reproduced on I20081007-1600. -------------- Test class with static methods: package node; public class Test { public static void node() {} } -------------- Test class with static import: package node2; import static node.Test.nod; public class Test2 { } -------------- Complete the third line of Test2 with the character 'e' and the aforementioned StackOverflowError will be thrown and the workbench is forced to terminate immediately.
Created attachment 116082 [details] Proposed patch Kent - pls review. I believed the loop got introduced by fix for bug 93913; which by the way did not handle field scenarii (only method collision case). My change avoids the reentrant call alltogether by ensuring supplying a mask during import resolution.
looks good
Added StaticImportTest#test070-072 + LookupTest#test091-094
Released for 3.5M3 Fixed
Created attachment 116109 [details] Proposed patch for 3.4
Jerome - shall we fix it for 3.4.2 ? StackOverflow is fairly bad, and the fix is quite reasonable.
+1 for 3.4.2 since the bug is very bad, and the fix is reasonable.
Released for 3.4.2.
Released into 3.3.x maintenance branch
Verified for 3.5M3 using I20081026-2000 build.
Verified for 3.4.2 using M20090127-1710