mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
unused declaration: add test for static import (IDEA-143882)
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<problems>
|
||||
<problem>
|
||||
<file>Holder.java</file>
|
||||
<line>4</line>
|
||||
<problem_class severity="WARNING" attribute_key="NOT_USED_ELEMENT_ATTRIBUTES">unused declaration</problem_class>
|
||||
<description>Method is never used.</description>
|
||||
</problem>
|
||||
</problems>
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
import static holder.Holder.*;
|
||||
|
||||
public class Usage {
|
||||
public static void main(String[] args) {
|
||||
System.out.println(CONST);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package holder;
|
||||
public class Holder {
|
||||
public static final String CONST = "JB";
|
||||
public String method() { return "JB"; }
|
||||
}
|
||||
@@ -206,4 +206,8 @@ public class UnusedDeclarationTest extends AbstractUnusedDeclarationTest {
|
||||
public void testReferenceFromGroovy() {
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testStaticImport() {
|
||||
doTest();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user