Community
Participate
Working Groups
Given the following file: """ import java.util.Collections class X { def foo() { // some comment Collections::<String>emptyList } } """ The import is wrongly marked as being unused.
Maybe this helps the investigation: changing to def foo() { // some comment Collections::<String>emptyList Collections::<String>emptyList // or any other call on Collections } makes the warning go away. Also, not any static call on a class causes this (but I can't see a pattern).
Please ignore my previous comment, I should read the title of the bug too. Since the presence of the comment triggers this, it's also explaining the other cases...
pushed fix and test to master
Requested via bug 522520. -M.