Spurious "unused import" warnings in Eclipse
doug.simon at oracle.com
Sun Oct 4 17:32:19 UTC 2015
A recent change to mx, graal-jvmci-8 and graal-compiler that force use of explicit imports has exposed an Eclipse bug that causes it to show spurious warnings about unused imports. Most of these warnings are related to static imports of static fields from Option inner classes. The warnings can usually be removed by causing the problematic file to be recompiled (e.g., add a space at the end of a line and save). Unfortunately, this seems to only remove the warnings from the Problems view but leaves them behind in the source pane - go figure!
Workarounds include making the relevant classes top level (e.g., ) or removing the use of the static imports (e.g., ). Please apply one of these as you encounter these spurious warnings as it could be a while before the bug is fixed in Eclipse.
More information about the graal-dev