mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-13 15:52:01 +07:00
Java: enable "don't consider class used when a member is implicitly used" by default and fix tests (IDEA-281800)
GitOrigin-RevId: e9d8112eb8fc4c03ff1abfb4f6883d05bed32c3e
This commit is contained in:
committed by
intellij-monorepo-bot
parent
f1f7ec91fd
commit
5e74812655
@@ -474,7 +474,7 @@ ide.unused.symbol.calculation.maxFilesToSearchUsagesIn=10
|
||||
ide.unused.symbol.calculation.maxFilesToSearchUsagesIn.description=Max number of scanned files to find usages of symbol
|
||||
ide.unused.symbol.calculation.maxFilesSizeToSearchUsagesIn=524288
|
||||
ide.unused.symbol.calculation.maxFilesSizeToSearchUsagesIn.description=Max files size in bytes to find usages of symbol in case there are a few files
|
||||
ide.unused.symbol.strict.entry.points=false
|
||||
ide.unused.symbol.strict.entry.points=true
|
||||
ide.unused.symbol.strict.entry.points.description=Do not consider implicit usages part of the entry points (editor only)
|
||||
|
||||
ide.tabbedPane.dragOutMultiplier=0.1
|
||||
|
||||
@@ -185,7 +185,7 @@ class GradleHighlightingTest : GradleCodeInsightTestCase() {
|
||||
|
|
||||
|import java.io.File;
|
||||
|
|
||||
|public class JavaTask extends DefaultTask {
|
||||
|public class <warning descr="Class 'JavaTask' is never used">JavaTask</warning> extends DefaultTask {
|
||||
| private String inputString;
|
||||
| private String unusedField;
|
||||
|
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import lombok.Getter;
|
||||
|
||||
public class GetterLazyInvocationProduceNPE {
|
||||
public class <warning descr="Class 'GetterLazyInvocationProduceNPE' is never used">GetterLazyInvocationProduceNPE</warning> {
|
||||
private static class Bar {
|
||||
public String sayHello() {
|
||||
return "Bar{}";
|
||||
@@ -17,7 +17,7 @@ public class GetterLazyInvocationProduceNPE {
|
||||
private Bar <warning descr="Private field 'bar2' is never assigned">bar2</warning>;
|
||||
private Car car;
|
||||
|
||||
public GetterLazyInvocationProduceNPE(Bar bar, Car car) {
|
||||
public <warning descr="Constructor 'GetterLazyInvocationProduceNPE(GetterLazyInvocationProduceNPE.Bar, GetterLazyInvocationProduceNPE.Car)' is never used">GetterLazyInvocationProduceNPE</warning>(Bar bar, Car car) {
|
||||
this.bar = bar;
|
||||
this.car = car;
|
||||
}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import lombok.Getter;
|
||||
|
||||
public class GetterLazyVariableNotInitialized {
|
||||
public class <warning descr="Class 'GetterLazyVariableNotInitialized' is never used">GetterLazyVariableNotInitialized</warning> {
|
||||
|
||||
private final String hoge;
|
||||
|
||||
public GetterLazyVariableNotInitialized(String hoge) {
|
||||
public <warning descr="Constructor 'GetterLazyVariableNotInitialized(java.lang.String)' is never used">GetterLazyVariableNotInitialized</warning>(String hoge) {
|
||||
this.hoge = hoge;
|
||||
}
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ public final class LombokBasics {
|
||||
}
|
||||
}
|
||||
@AllArgsConstructor
|
||||
class FinalCheck {
|
||||
class <warning descr="Class 'FinalCheck' is never used">FinalCheck</warning> {
|
||||
@Getter
|
||||
private int a;
|
||||
@Setter
|
||||
@@ -28,7 +28,7 @@ class FinalCheck {
|
||||
@Getter @Setter
|
||||
private int c;
|
||||
}
|
||||
final class Foo {
|
||||
final class <warning descr="Class 'Foo' is never used">Foo</warning> {
|
||||
@Getter
|
||||
String bar;
|
||||
|
||||
@@ -45,17 +45,17 @@ class <warning descr="Local class 'Inner' is never used">Inner</warning> {
|
||||
}
|
||||
}
|
||||
}
|
||||
class IntellijInspectionNPEDemo {
|
||||
class <warning descr="Class 'IntellijInspectionNPEDemo' is never used">IntellijInspectionNPEDemo</warning> {
|
||||
|
||||
@Builder
|
||||
public static class SomeDataClass {
|
||||
public static class <warning descr="Class 'SomeDataClass' is never used">SomeDataClass</warning> {
|
||||
public static class <warning descr="Class 'SomeDataClassBuilder' is never used">SomeDataClassBuilder</warning> {
|
||||
private void <warning descr="Private method 'buildWithJSON()' is never used">buildWithJSON</warning>() {
|
||||
this.jsonObject = "test";
|
||||
}
|
||||
}
|
||||
|
||||
public final String jsonObject;
|
||||
public final String <warning descr="Public field 'jsonObject' is assigned but never accessed">jsonObject</warning>;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ import lombok.Setter;
|
||||
//@AllArgsConstructor(onConstructor_ = @Deprecated)
|
||||
@AllArgsConstructor(onConstructor = @__( @Deprecated))
|
||||
@RequiredArgsConstructor(onConstructor_ = @Deprecated)
|
||||
public class OnXExample {
|
||||
public class <warning descr="Class 'OnXExample' is never used">OnXExample</warning> {
|
||||
@Getter(onMethod_ = {@Deprecated, @SuppressWarnings(value = "someId")}) //JDK8
|
||||
@Setter(onMethod_ = @Deprecated, onParam_ = @SuppressWarnings(value = "someOtherId")) //JDK8
|
||||
private long unid;
|
||||
|
||||
Reference in New Issue
Block a user