Community
Participate
Working Groups
On a stock eclipse-jee-2019-03-R-linux-gtk-x86_64, create a Java project using Java 11 and a dependency to SLF4J 1.7.25. Add the following two classes in the project in their respective expected folder and files. package mypackage; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class Client { private static final Logger LOGGER = LoggerFactory.getLogger(Client.class); private GitHistory allHistory; public void tryRetrieve() { update(); } public void update() { } } package mypackage; public class GitHistory { } Search for the Workspace references to Client#update() (right-click on it, Refrerences / Workspace or use shortcut key). Eclipse sees 0 references in workspace (0 matches filtered from view), instead of the expected reference (namely, Client#tryRetrieve()). The bug also happens with a Maven project (if using Java 11), and with replacing SLF4J 1.7.25 by SLF4J 1.8.0-beta4. The bug does not happen when replacing SLF4J by, for example, classgraph 4.4.7, or removing the dependency altogether, or removing the call to LoggerFactory in the Client class source code (even if leaving the import to LoggerFactory there), or removing the reference to GitHistory in Client, or switching from Java 11 to Java 5. In all those cases, Eclipse search finds the expected reference to Client#update().
Created attachment 277992 [details] Example pom.xml to reproduce the bug
This is probably a duplicate of bug 545293. Please try a 4.12 integration build from http://download.eclipse.org/eclipse/downloads/
Thanks! The bug does not happen with Eclipse SDK I20190324-1800. (Note however that it’s much less featured than the Java EE release one I usually use, didn’t find it in the list.) I expected my bug would not be a duplicate because my example project uses no modules. The SLF4J JAR is added to the classpath and not the module path. Strange…
Apparently a workaround for now is to, after importing the Maven project (relying on Java 11), uncheck in Java compiler projet options “Use compliance from execution environment 'JavaSE-11' on the 'Java build path'” and switch to Compliance level 9. I only checked on my sample project and it restores the expected search results.
(In reply to Olivier Cailloux from comment #3) > Thanks! The bug does not happen with Eclipse SDK I20190324-1800. > (Note however that it’s much less featured than the Java EE release one I > usually use, didn’t find it in the list.) I see it listed as "Eclipse IDE for Enterprise Java Developers". That's the one you want, right?
I do not see “Eclipse IDE for Enterprise Java Developers” at https://download.eclipse.org/eclipse/downloads/drops4/I20190324-1800/. What am I missing?
(In reply to Olivier Cailloux from comment #6) > I do not see “Eclipse IDE for Enterprise Java Developers” at > https://download.eclipse.org/eclipse/downloads/drops4/I20190324-1800/. What > am I missing? Ah, that is the place you go to get the developer builds (mostly, i.e.) The final bits of all packages are available here: https://www.eclipse.org/downloads/packages/
I pointed him there in comment 2 He needs a 4.12 integration build that has the fix for bug 545293 ...
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.