diff --git a/java/java-tests/testData/inspection/dataFlow/fixture/AnonymousFieldIndependence.java b/java/java-tests/testData/inspection/dataFlow/fixture/AnonymousFieldIndependence.java index e698d04c9e53..1e6c06f509f6 100644 --- a/java/java-tests/testData/inspection/dataFlow/fixture/AnonymousFieldIndependence.java +++ b/java/java-tests/testData/inspection/dataFlow/fixture/AnonymousFieldIndependence.java @@ -2,14 +2,14 @@ class SomeClientClass { { new Abstract() { void foo() { - if (field instanceof String) { + if (field instanceof String) { } } }; new Abstract() { void foo() { - if (field instanceof Integer) { + if (field instanceof Integer) { } } diff --git a/java/java-tests/testData/inspection/dataFlow/fixture/CastInstanceOf.java b/java/java-tests/testData/inspection/dataFlow/fixture/CastInstanceOf.java index b20f5e680de5..5afa95dae97f 100644 --- a/java/java-tests/testData/inspection/dataFlow/fixture/CastInstanceOf.java +++ b/java/java-tests/testData/inspection/dataFlow/fixture/CastInstanceOf.java @@ -8,7 +8,7 @@ class Test { void test() { String x = (String)getXyz(); - if(x instanceof String) { + if(x instanceof String) { System.out.println("yes!"); } } @@ -16,7 +16,7 @@ class Test { void testUnknown() { while(getXyz() != null) { String x = (String)getXyz(); - if(x instanceof String) { + if(x instanceof String) { System.out.println("yes!"); } } diff --git a/java/java-tests/testData/inspection/dataFlow/fixture/CovariantReturn.java b/java/java-tests/testData/inspection/dataFlow/fixture/CovariantReturn.java index 70140b2bb076..78c9ca06c0a8 100644 --- a/java/java-tests/testData/inspection/dataFlow/fixture/CovariantReturn.java +++ b/java/java-tests/testData/inspection/dataFlow/fixture/CovariantReturn.java @@ -49,16 +49,16 @@ class CovariantReturn { } boolean testType(Base base) { - return base instanceof Derived && base.baz() instanceof String; + return base instanceof Derived && base.baz() instanceof String; } boolean testType2(Base base) { return base instanceof Derived && base instanceof Derived2 && - base.baz() instanceof String; + base.baz() instanceof String; } boolean testTypeGeneric(BaseGeneric base) { - return base instanceof DerivedGenericImpl && base.get(null) instanceof Integer; + return base instanceof DerivedGenericImpl && base.get(null) instanceof Integer; } interface Super { diff --git a/java/java-tests/testData/inspection/dataFlow/fixture/StreamInlining.java b/java/java-tests/testData/inspection/dataFlow/fixture/StreamInlining.java index 663768d2a6a3..cd530200ae3f 100644 --- a/java/java-tests/testData/inspection/dataFlow/fixture/StreamInlining.java +++ b/java/java-tests/testData/inspection/dataFlow/fixture/StreamInlining.java @@ -87,7 +87,7 @@ public class StreamInlining { } void test(Stream stream, Optional opt) { - stream.filter(String.class::isInstance).forEach(System.out::println); + stream.filter(String.class::isInstance).forEach(System.out::println); opt.filter(String.class::isInstance).ifPresent(System.out::println); } diff --git a/platform/platform-resources-en/src/messages/InspectionsBundle.properties b/platform/platform-resources-en/src/messages/InspectionsBundle.properties index 8eeee86a840c..5fc4c7d06531 100644 --- a/platform/platform-resources-en/src/messages/InspectionsBundle.properties +++ b/platform/platform-resources-en/src/messages/InspectionsBundle.properties @@ -63,7 +63,7 @@ dataflow.message.npe.field.access.sure=Dereference of #ref #loc wil dataflow.message.npe.field.access=Dereference of #ref #loc may produce java.lang.NullPointerException dataflow.message.cce=Casting {0} to #ref #loc may produce java.lang.ClassCastException dataflow.message.arraystore=Storing element of type {0} to array of {1} elements may produce java.lang.ArrayStoreException -dataflow.message.redundant.instanceof=Condition #ref #loc is redundant and can be replaced with != null +dataflow.message.redundant.instanceof=Condition #ref #loc is redundant and can be replaced with a null check dataflow.message.contract.fail=The call to '#ref' always fails, according to its method contracts dataflow.message.contract.fail.index=The call to '#ref' always fails as index is out of bounds dataflow.message.constant.condition=Condition #ref #loc is always {0}