diff --git a/java/java-analysis-api/resources/messages/JavaAnalysisBundle.properties b/java/java-analysis-api/resources/messages/JavaAnalysisBundle.properties index 972deeb2951c..806502041e52 100644 --- a/java/java-analysis-api/resources/messages/JavaAnalysisBundle.properties +++ b/java/java-analysis-api/resources/messages/JavaAnalysisBundle.properties @@ -117,7 +117,7 @@ intention.text.remove.annotation=Remove scope.package=Package {0} -0.field.is.always.initialized.not.null=@{0} field is always initialized not-null +0.field.is.always.initialized.not.null=@{0} field is always initialized non-null access.can.be.0=Access can be ''{0}'' access.can.be.package.private=Access can be package-private access.to.field.code.ref.code.outside.of.declared.guards.loc=Access to field #ref outside of declared guards #loc @@ -129,7 +129,7 @@ anonymous.ref.loc.can.be.replaced.with.0=Anonymous #ref #loc can be replaced wit anonymous.ref.loc.can.be.replaced.with.lambda=Anonymous #ref #loc can be replaced with lambda assigning.a.collection.of.nullable.elements=Assigning a collection of nullable elements into a collection of non-null elements nullable.stuff.error.overriding.nullable.with.notnull=Overriding a collection of nullable elements with a collection of non-null elements -nullable.stuff.error.overriding.notnull.with.nullable=Overriding a collection of not-null elements with a collection of nullable elements +nullable.stuff.error.overriding.notnull.with.nullable=Overriding a collection of non-null elements with a collection of nullable elements comparision.between.object.and.primitive=Comparison between Object and primitive is illegal and is accepted in Java 7 only custom.exception.class.should.have.a.constructor=Custom exception class should have a constructor with a single message parameter of String type delimiters.argument.contains.duplicated.characters=StringTokenizer 'delimiters' argument contains duplicated characters @@ -200,7 +200,7 @@ inspection.data.flow.redundant.instanceof.quickfix=Replace with a null check inspection.data.flow.simplify.boolean.expression.quickfix=Simplify boolean expression inspection.data.flow.simplify.to.assignment.quickfix.name=Simplify to normal assignment inspection.data.flow.turn.off.constant.references.quickfix=Don't report values which are guaranteed to be constant -inspection.data.flow.turn.off.nullable.returning.notnull.quickfix=Don't report nullable methods which always return not-null value +inspection.data.flow.turn.off.nullable.returning.notnull.quickfix=Don't report nullable methods which always return non-null value inspection.data.flow.turn.off.true.asserts.quickfix=Don't report always true assertions inspection.duplicate.throws.display.name=Duplicate throws inspection.duplicate.throws.ignore.subclassing.option=Ignore exceptions subclassing others @@ -240,13 +240,13 @@ inspection.nullable.problems.annotated.field.setter.parameter.not.annotated=Sett inspection.nullable.problems.method.overrides.NotNull=Not annotated method overrides method annotated with @{0} inspection.nullable.problems.parameter.overrides.NotNull=Not annotated parameter overrides @{0} parameter inspection.nullable.problems.primitive.type.annotation=Primitive type members cannot be annotated -inspection.nullable.problems.nullable.instantiation.of.notnull=Not-null type parameter ''{0}'' cannot be instantiated with @{1} type -inspection.nullable.problems.nullable.instantiation.of.notnull.container=Not-null type parameter ''{0}'' cannot be instantiated under @{1} +inspection.nullable.problems.nullable.instantiation.of.notnull=Non-null type parameter ''{0}'' cannot be instantiated with @{1} type +inspection.nullable.problems.nullable.instantiation.of.notnull.container=Non-null type parameter ''{0}'' cannot be instantiated under @{1} inspection.nullable.problems.redundant.annotation.under.container=Redundant nullability annotation in the scope of @{0} inspection.nullable.problems.redundant.annotation.inherited.notnull=Redundant nullability annotation: type parameter upper bound is already non-null -inspection.nullable.problems.receiver.annotation=Receiver parameter is inherently not-null +inspection.nullable.problems.receiver.annotation=Receiver parameter is inherently non-null inspection.nullable.problems.applied.to.package=Annotation on fully-qualified name must be placed before the last component -inspection.nullable.problems.outer.type=Outer type is inherently not-null +inspection.nullable.problems.outer.type=Outer type is inherently non-null inspection.nullable.problems.at.class=Nullability annotation is not applicable to classes inspection.nullable.problems.at.constructor=Nullability annotation is not applicable to constructors inspection.nullable.problems.at.enum.constant=Nullability annotation is not applicable to enum constants @@ -322,7 +322,7 @@ non.null.type.argument.is.expected=Non-null type argument is expected nullable.stuff.problems.overridden.method.parameters.are.not.annotated=Overriding method parameters are not annotated nullable.stuff.problems.overridden.methods.are.not.annotated=Overriding methods are not annotated parameter.can.be.null=Parameter can be null -parameter.is.always.not.null=Parameter is always not-null +parameter.is.always.not.null=Parameter is always non-null possible.heap.pollution.from.parameterized.vararg.type.loc=Possible heap pollution from parameterized vararg type #loc redundant.block.marker=Redundant block marker remove.block.marker.comments=Remove block marker comment @@ -408,10 +408,10 @@ inspection.contract.checker.contract.clause.never.satisfied=Contract clause ''{0 inspection.contract.checker.pure.method.mutation.contract=Pure method cannot have mutation contract inspection.contract.checker.parameter.count.mismatch=Method takes {0} parameters, while contract clause ''{1}'' expects {2} inspection.contract.checker.primitive.parameter.nullability=Parameter ''{0}'' has primitive type ''{1}'', so ''{2}'' is not applicable -inspection.contract.checker.inferred.notnull.parameter.null=Parameter ''{0}'' is inferred to be not-null, so ''null'' is not applicable -inspection.contract.checker.notnull.parameter.null=Parameter ''{0}'' is annotated as not-null, so ''null'' is not applicable -inspection.contract.checker.inferred.notnull.parameter.notnull=Parameter ''{0}'' is inferred to be not-null, so ''!null'' is always satisfied -inspection.contract.checker.notnull.parameter.notnull=Parameter ''{0}'' is annotated as not-null, so ''!null'' is always satisfied +inspection.contract.checker.inferred.notnull.parameter.null=Parameter ''{0}'' is inferred to be non-null, so ''null'' is not applicable +inspection.contract.checker.notnull.parameter.null=Parameter ''{0}'' is annotated as non-null, so ''null'' is not applicable +inspection.contract.checker.inferred.notnull.parameter.notnull=Parameter ''{0}'' is inferred to be non-null, so ''!null'' is always satisfied +inspection.contract.checker.notnull.parameter.notnull=Parameter ''{0}'' is annotated as non-null, so ''!null'' is always satisfied inspection.contract.checker.boolean.condition.for.nonboolean.parameter=Parameter ''{0}'' has ''{1}'' type (expected boolean) inspection.contract.checker.contract.violated=Contract clause ''{0}'' is violated inspection.contract.checker.no.exception.thrown=Contract clause ''{0}'' is violated: no exception is thrown @@ -566,7 +566,7 @@ required.type=Required type provided.type=Provided type.mismatch.reason=reason: {0} change.visibility.level=Make {0} {1} -inspection.redundant.tostring.option.notnull.qualifier=Report only when qualifier is known to be not-null +inspection.redundant.tostring.option.notnull.qualifier=Report only when qualifier is known to be non-null highlighting.try.blocks=Highlighting try blocks\u2026 intention.family.name.remove.new.family.name=Remove 'new' inspection.unsatisfied.range.display.name=Return value is outside of declared range diff --git a/java/java-analysis-impl/resources/messages/InspectionGadgetsBundle.properties b/java/java-analysis-impl/resources/messages/InspectionGadgetsBundle.properties index eb5912ce3c52..27a04955f0ee 100644 --- a/java/java-analysis-impl/resources/messages/InspectionGadgetsBundle.properties +++ b/java/java-analysis-impl/resources/messages/InspectionGadgetsBundle.properties @@ -1868,7 +1868,7 @@ class.independent.of.module.display.name=Class independent of its module class.independent.of.module.problem.descriptor=Class #ref has no dependencies or dependents in its module #loc class.only.used.in.one.module.display.name=Class only used from one other module class.only.used.in.one.module.problem.descriptor=Class #ref has only dependencies on and/or dependents in module ''{0}'' #loc -simplifiable.equals.expression.option.non.constant=Report equals with non-constant not-null argument +simplifiable.equals.expression.option.non.constant=Report equals with non-constant non-null argument simplifiable.equals.expression.display.name=Unnecessary 'null' check before 'equals()' call simplifiable.equals.expression.problem.descriptor=Unnecessary ''null'' check before ''{0}()'' call #loc simplifiable.equals.expression.quickfix=Flip ''.{0}()'' and remove unnecessary ''null'' check diff --git a/java/java-tests/testData/inspection/dataFlow/contractCheck/DelegationToInstanceMethod.java b/java/java-tests/testData/inspection/dataFlow/contractCheck/DelegationToInstanceMethod.java index ead499e76489..9330b62dafd1 100644 --- a/java/java-tests/testData/inspection/dataFlow/contractCheck/DelegationToInstanceMethod.java +++ b/java/java-tests/testData/inspection/dataFlow/contractCheck/DelegationToInstanceMethod.java @@ -3,7 +3,7 @@ import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; class Foo { - @Contract("!null,true->!null") + @Contract("!null,true->!null") String delegationToInstance(@NotNull Foo f, boolean createIfNeeded) { return f.getString(createIfNeeded); } @Contract("true->!null") diff --git a/java/java-tests/testData/inspection/dataFlow/contractCheck/FailDelegation.java b/java/java-tests/testData/inspection/dataFlow/contractCheck/FailDelegation.java index a9197b7e894a..fc3cfba7398c 100644 --- a/java/java-tests/testData/inspection/dataFlow/contractCheck/FailDelegation.java +++ b/java/java-tests/testData/inspection/dataFlow/contractCheck/FailDelegation.java @@ -3,12 +3,12 @@ import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; class Foo { - @Contract("!null,true->!null") + @Contract("!null,true->!null") String delegationToInstance(@NotNull Foo f, boolean createIfNeeded) { return f.getString(createIfNeeded); } - @Contract("!null,false->!null") + @Contract("!null,false->!null") String delegationToInstanceOk(@NotNull Foo f, boolean createIfNeeded) { return f.getString(createIfNeeded); } diff --git a/java/java-tests/testData/inspection/dataFlow/contractCheck/InferredNotNull.java b/java/java-tests/testData/inspection/dataFlow/contractCheck/InferredNotNull.java index 67c206944d04..00c9c57fca83 100644 --- a/java/java-tests/testData/inspection/dataFlow/contractCheck/InferredNotNull.java +++ b/java/java-tests/testData/inspection/dataFlow/contractCheck/InferredNotNull.java @@ -2,7 +2,7 @@ import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; class Foo { - @Contract("null -> true") + @Contract("null -> true") public boolean test(Boolean foo) { return foo.booleanValue(); } diff --git a/java/java-tests/testData/inspection/notNullField/quickFix/afterRemoveAnnotation.java b/java/java-tests/testData/inspection/notNullField/quickFix/afterRemoveAnnotation.java index b0f8b40ecf69..910b3fe0eb38 100644 --- a/java/java-tests/testData/inspection/notNullField/quickFix/afterRemoveAnnotation.java +++ b/java/java-tests/testData/inspection/notNullField/quickFix/afterRemoveAnnotation.java @@ -1,4 +1,4 @@ -// "Remove not-null annotation" "true" +// "Remove non-null annotation" "true" import org.jetbrains.annotations.NotNull; class X { diff --git a/java/java-tests/testData/inspection/notNullField/quickFix/beforeRemoveAnnotation.java b/java/java-tests/testData/inspection/notNullField/quickFix/beforeRemoveAnnotation.java index 6f32259c3f9e..07ccbc4ae963 100644 --- a/java/java-tests/testData/inspection/notNullField/quickFix/beforeRemoveAnnotation.java +++ b/java/java-tests/testData/inspection/notNullField/quickFix/beforeRemoveAnnotation.java @@ -1,4 +1,4 @@ -// "Remove not-null annotation" "true" +// "Remove non-null annotation" "true" import org.jetbrains.annotations.NotNull; class X { diff --git a/java/java-tests/testData/inspection/nullableProblems/ForeachParameterNullability.java b/java/java-tests/testData/inspection/nullableProblems/ForeachParameterNullability.java index 874b0ab2ac14..bc705a2e0c52 100644 --- a/java/java-tests/testData/inspection/nullableProblems/ForeachParameterNullability.java +++ b/java/java-tests/testData/inspection/nullableProblems/ForeachParameterNullability.java @@ -14,10 +14,10 @@ class JC { for (@NotNull Object o : getNullableStuff()) { System.out.println(o.getClass()); } - for (@Nullable Object o : getNotNullStuff()) { + for (@Nullable Object o : getNotNullStuff()) { System.out.println(o.getClass()); } getNullableStuff().forEach((@NotNull Object s) -> System.out.println(s.hashCode())); - getNotNullStuff().forEach((@Nullable Object s) -> System.out.println(s.hashCode())); + getNotNullStuff().forEach((@Nullable Object s) -> System.out.println(s.hashCode())); } } \ No newline at end of file diff --git a/java/java-tests/testData/inspection/nullableProblems/IncompatibleInstantiation.java b/java/java-tests/testData/inspection/nullableProblems/IncompatibleInstantiation.java index 722bcc821321..3162221ee59a 100644 --- a/java/java-tests/testData/inspection/nullableProblems/IncompatibleInstantiation.java +++ b/java/java-tests/testData/inspection/nullableProblems/IncompatibleInstantiation.java @@ -8,8 +8,8 @@ import java.util.function.Supplier; class Main { public static void main(String[] args) { - Main.<@Nullable Object>fNonNullBound(() -> getNullableObject()); - Main.<@Nullable Object>fNonNullBound(Main::getNullableObject); + Main.<@Nullable Object>fNonNullBound(() -> getNullableObject()); + Main.<@Nullable Object>fNonNullBound(Main::getNullableObject); } @@ -28,7 +28,7 @@ class Main { @NullableScope static class NullableScopeClass { void test() { - Main.<Object>fNonNullBound(Main::getNullableObject); + Main.<Object>fNonNullBound(Main::getNullableObject); } } } diff --git a/java/java-tests/testData/inspection/nullableProblems/IncorrectPlacement.java b/java/java-tests/testData/inspection/nullableProblems/IncorrectPlacement.java index bd1dabeb756e..f0fb0d509819 100644 --- a/java/java-tests/testData/inspection/nullableProblems/IncorrectPlacement.java +++ b/java/java-tests/testData/inspection/nullableProblems/IncorrectPlacement.java @@ -5,8 +5,8 @@ public class IncorrectPlacement extends @Nullable IncorrectPlacement() {} - void test(@Nullable IncorrectPlacement this) { - @Nullable IncorrectPlacement.Inner a1; + void test(@Nullable IncorrectPlacement this) { + @Nullable IncorrectPlacement.Inner a1; IncorrectPlacement.@Nullable Inner a2; } diff --git a/java/java-tests/testData/inspection/nullableProblems/IncorrectPlacementAmbiguous.java b/java/java-tests/testData/inspection/nullableProblems/IncorrectPlacementAmbiguous.java index 692343c8c6e7..b861d9f27e46 100644 --- a/java/java-tests/testData/inspection/nullableProblems/IncorrectPlacementAmbiguous.java +++ b/java/java-tests/testData/inspection/nullableProblems/IncorrectPlacementAmbiguous.java @@ -5,7 +5,7 @@ public class IncorrectPlacementAmbiguous extends @Nullable IncorrectPlacementAmbiguous() {} - void test(@Nullable IncorrectPlacementAmbiguous this) { + void test(@Nullable IncorrectPlacementAmbiguous this) { @Nullable IncorrectPlacementAmbiguous.Inner a1; IncorrectPlacementAmbiguous.@Nullable Inner a2; } diff --git a/java/java-tests/testData/inspection/nullableProblems/IncorrectPlacementAmbiguousJava6.java b/java/java-tests/testData/inspection/nullableProblems/IncorrectPlacementAmbiguousJava6.java index 7780933c7252..a3b2eeafbc7e 100644 --- a/java/java-tests/testData/inspection/nullableProblems/IncorrectPlacementAmbiguousJava6.java +++ b/java/java-tests/testData/inspection/nullableProblems/IncorrectPlacementAmbiguousJava6.java @@ -5,7 +5,7 @@ public class IncorrectPlacementAmbiguousJava6 extends @Nullable IncorrectPlacementAmbiguousJava6() {} - void test(@Nullable IncorrectPlacementAmbiguousJava6 this) { + void test(@Nullable IncorrectPlacementAmbiguousJava6 this) { @Nullable IncorrectPlacementAmbiguousJava6.Inner a1; IncorrectPlacementAmbiguousJava6.@Nullable Inner a2; } diff --git a/java/java-tests/testData/inspection/nullableProblems/NullableFieldNotnullParam.java b/java/java-tests/testData/inspection/nullableProblems/NullableFieldNotnullParam.java index b811514339f6..8b46df8857ce 100644 --- a/java/java-tests/testData/inspection/nullableProblems/NullableFieldNotnullParam.java +++ b/java/java-tests/testData/inspection/nullableProblems/NullableFieldNotnullParam.java @@ -33,7 +33,7 @@ class Test2 { } class Test3 { - @Nullable final Object member; + @Nullable final Object member; public Test3(@NotNull Object member) { this.member = member; diff --git a/java/java-tests/testData/inspection/nullableProblems/OverridingNotNullCollectionWithNullable.java b/java/java-tests/testData/inspection/nullableProblems/OverridingNotNullCollectionWithNullable.java index 2b58f1b37d0f..16f79e80f0a0 100644 --- a/java/java-tests/testData/inspection/nullableProblems/OverridingNotNullCollectionWithNullable.java +++ b/java/java-tests/testData/inspection/nullableProblems/OverridingNotNullCollectionWithNullable.java @@ -14,12 +14,12 @@ abstract class Parent { class Child extends Parent { @Override - @Nullable String @NotNull [] getStrings() { + @Nullable String @NotNull [] getStrings() { throw new UnsupportedOperationException(); } @Override - @NotNull List<@Nullable String> getStringList() { + @NotNull List<@Nullable String> getStringList() { throw new UnsupportedOperationException(); } diff --git a/java/java-tests/testSrc/com/intellij/java/slicer/DataflowExceptionAnalysisProviderTest.java b/java/java-tests/testSrc/com/intellij/java/slicer/DataflowExceptionAnalysisProviderTest.java index d19f09167fb1..6892f299476f 100644 --- a/java/java-tests/testSrc/com/intellij/java/slicer/DataflowExceptionAnalysisProviderTest.java +++ b/java/java-tests/testSrc/com/intellij/java/slicer/DataflowExceptionAnalysisProviderTest.java @@ -1,4 +1,4 @@ -// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. +// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.java.slicer; import com.intellij.execution.filters.ExceptionAnalysisProvider; @@ -22,57 +22,57 @@ public class DataflowExceptionAnalysisProviderTest extends LightJavaCodeInsightT public void testClassCast() { doTest("java.lang.ClassCastException: class X cannot be cast to class java.lang.Number", - "Find why 'obj' could be X (not-null)", + "Find why 'obj' could be X (non-null)", "class X {static void test(Object obj) {System.out.println(((Number) obj).intValue());}}"); } public void testClassCastUnresolvedTarget() { doTest("java.lang.ClassCastException: class X cannot be cast to class foo.Bar", - "Find why 'obj' could be X (not-null)", + "Find why 'obj' could be X (non-null)", "class X {static void test(Object obj) {System.out.println(((Bar) obj).intValue());}}"); } public void testClassCastUnknownClass() { doTest("java.lang.ClassCastException: class XYZ cannot be cast to class java.lang.Number", - "Find why 'obj' could be not instanceof java.lang.Number (not-null)", + "Find why 'obj' could be not instanceof java.lang.Number (non-null)", "class X {static void test(Object obj) {System.out.println(((Number) obj).intValue());}}"); } public void testClassCastGenericArray() { //noinspection unchecked doTest("java.lang.ClassCastException: class java.lang.String cannot be cast to class [Ljava.lang.Object; (java.lang.String and [Ljava.lang.Object; are in module java.base of loader 'bootstrap')", - "Find why 'obj' could be java.lang.String (not-null)", + "Find why 'obj' could be java.lang.String (non-null)", "class X {static E[] asArray(Object obj) {return (E[])obj;}}"); } public void testClassCastFromArray() { doTest("java.lang.ClassCastException: class [Ljava.lang.String; cannot be cast to class java.lang.String", - "Find why 'obj' could be java.lang.String[] (not-null)", + "Find why 'obj' could be java.lang.String[] (non-null)", "class X {static String cast(Object obj) {return (String)obj;}}"); } public void testClassCastFromPrimitiveTwoDimArray() { doTest("java.lang.ClassCastException: class [[J cannot be cast to class java.lang.String", - "Find why 'obj' could be long[][] (not-null)", + "Find why 'obj' could be long[][] (non-null)", "class X {static String cast(Object obj) {return (String)obj;}}"); } public void testClassCastFromNested() { doTest("java.lang.ClassCastException: class MainTest$X cannot be cast to class java.lang.String", - "Find why 'obj' could be MainTest.X (not-null)", + "Find why 'obj' could be MainTest.X (non-null)", "class MainTest {static String cast(Object obj) {return (String)obj;}static class X {}}"); } public void testClassCastFromLocal() { doTest("java.lang.ClassCastException: class MainTest$1X cannot be cast to class java.lang.String", - "Find why 'obj' could be X (not-null)", + "Find why 'obj' could be X (non-null)", "class MainTest {static String cast(Object obj) {return (String)obj;}" + "public static void main(String[] args) { class X{}cast(new X()); }}"); } public void testClassCastFromAnonymous() { doTest("java.lang.ClassCastException: class MainTest$1 cannot be cast to class java.lang.String", - "Find why 'obj' could be anonymous java.lang.Object (not-null)", + "Find why 'obj' could be anonymous java.lang.Object (non-null)", "class MainTest {static String cast(Object obj) {return (String)obj;}" + "public static void main(String[] args) { cast(new Object() {});}}"); } @@ -158,7 +158,7 @@ public class DataflowExceptionAnalysisProviderTest extends LightJavaCodeInsightT public void testStringInEquality() { doTest("java.lang.IllegalArgumentException", - "Find why 's' could be != \"hello\" (not-null)", + "Find why 's' could be != \"hello\" (non-null)", "class X {static void test(String s) {if (!s.equals(\"hello\")) throw new IllegalArgumentException();}}"); } @@ -176,7 +176,7 @@ public class DataflowExceptionAnalysisProviderTest extends LightJavaCodeInsightT public void testClassInEquality() { doTest("java.lang.IllegalArgumentException", - "Find why 'cls' could be != String (not-null)", + "Find why 'cls' could be != String (non-null)", "class X {static void test(Class cls) {if (!cls.equals(String.class)) throw new IllegalArgumentException();}}"); } @@ -206,7 +206,7 @@ public class DataflowExceptionAnalysisProviderTest extends LightJavaCodeInsightT public void testIsNotNull() { doTest("java.lang.IllegalArgumentException", - "Find why 'obj' could be not-null", + "Find why 'obj' could be non-null", "class X {static void test(Object obj) {if (null != obj) {throw new IllegalArgumentException();}}}"); } @@ -247,7 +247,7 @@ public class DataflowExceptionAnalysisProviderTest extends LightJavaCodeInsightT public void testInSwitchDefaultString() { doTest("java.lang.IllegalArgumentException", - "Find why 's' could be != \"BAR\", \"FOO\" (not-null)", + "Find why 's' could be != \"BAR\", \"FOO\" (non-null)", "class X {static void test(String s) { switch (s) { " + "case \"FOO\": break; case \"BAR\": return;" + "default: case \"BAZ\": throw new IllegalArgumentException(); } } }"); @@ -296,7 +296,7 @@ public class DataflowExceptionAnalysisProviderTest extends LightJavaCodeInsightT } public void testAssertNull() { - doTestIntermediate("Find why 'str' could be not-null", + doTestIntermediate("Find why 'str' could be non-null", "class X {static void test(String str) {assertNull(str);}" + "static void assertNull(Object obj) {if(obj != null) throw new AssertionError();}}"); } diff --git a/java/java-tests/testSrc/com/intellij/java/slicer/SliceTreeTest.java b/java/java-tests/testSrc/com/intellij/java/slicer/SliceTreeTest.java index 9b87e52e2e02..d7774efbff63 100644 --- a/java/java-tests/testSrc/com/intellij/java/slicer/SliceTreeTest.java +++ b/java/java-tests/testSrc/com/intellij/java/slicer/SliceTreeTest.java @@ -1,4 +1,4 @@ -// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.java.slicer; import com.intellij.analysis.AnalysisScope; @@ -244,12 +244,12 @@ public class SliceTreeTest extends SliceTestCase { 6| |String |l;| in X 52| |l = |d|;| in X.set(String) 51| |void| set(String |d|) {| in X.set(String) - 17| |set(|new| String()|);| in X.X(String) (filter: not-null) + 17| |set(|new| String()|);| in X.X(String) (filter: non-null) Value: nn() 6| |String |l;| in X 52| |l = |d|;| in X.set(String) 51| |void| set(String |d|) {| in X.set(String) - 18| |set(|nn()|);| in X.X(String) (filter: not-null) + 18| |set(|nn()|);| in X.X(String) (filter: non-null) Value: CON 6| |String |l;| in X 52| |l = |d|;| in X.set(String) @@ -259,20 +259,20 @@ public class SliceTreeTest extends SliceTestCase { 6| |String |l;| in X 52| |l = |d|;| in X.set(String) 51| |void| set(String |d|) {| in X.set(String) - 21| |set(|nn|);| in X.X(String) (filter: not-null) + 21| |set(|nn|);| in X.X(String) (filter: non-null) Value: g 6| |String |l;| in X 52| |l = |d|;| in X.set(String) 51| |void| set(String |d|) {| in X.set(String) - 27| |set(|g|);| in X.X(String) (filter: not-null) + 27| |set(|g|);| in X.X(String) (filter: non-null) Value: t == null ? "null" : t 6| |String |l;| in X 52| |l = |d|;| in X.set(String) 51| |void| set(String |d|) {| in X.set(String) - 48| |x.set(|t == |null| ? |"null"| : t|);| in X.fs(String, X) (filter: not-null) + 48| |x.set(|t == |null| ? |"null"| : t|);| in X.fs(String, X) (filter: non-null) Value: d 6| |String |l;| in X - 55| |l = |d|;| in X.setFromNN(String) (filter: not-null) + 55| |l = |d|;| in X.setFromNN(String) (filter: non-null) Other Values Value: private String d; 6| |String |l;| in X diff --git a/java/openapi/resources/messages/JavaBundle.properties b/java/openapi/resources/messages/JavaBundle.properties index b0a3bcc1d183..96711d5b68fa 100644 --- a/java/openapi/resources/messages/JavaBundle.properties +++ b/java/openapi/resources/messages/JavaBundle.properties @@ -356,7 +356,7 @@ inspection.conditional.break.in.infinite.loop.allow.condition.fusion=Allow mergi inspection.conditional.break.in.infinite.loop.suggest.conversion.when.if.is.single.stmt.in.loop=Suggest conversion when 'if' is a single statement in loop inspection.convert.to.local.quickfix=Convert to local variable inspection.data.flow.display.name=Nullability and data flow problems -inspection.data.flow.optional.of.nullable.misuse.display.name=Use of Optional.ofNullable with null or not-null argument +inspection.data.flow.optional.of.nullable.misuse.display.name=Use of Optional.ofNullable with null or non-null argument inspection.data.flow.constant.values.display.name=Constant values inspection.data.flow.unreachable.code.display.name=Unreachable code inspection.data.flow.unreachable.code.option.ignore.trivial.name=Ignore trivial exit statements @@ -368,7 +368,7 @@ inspection.data.flow.nullable.quickfix.option=Suggest @Nullable annotation for m inspection.data.flow.true.asserts.option=Don't report assertions with condition statically proven to be always true inspection.data.flow.ignore.assert.statements=Ignore assert statements inspection.data.flow.treat.non.annotated.members.and.parameters.as.nullable=Treat non-annotated members and parameters as @Nullable -inspection.data.flow.report.not.null.required.parameter.with.null.literal.argument.usages=Report not-null required parameter with null-literal argument usages +inspection.data.flow.report.not.null.required.parameter.with.null.literal.argument.usages=Report non-null required parameter with null-literal argument usages inspection.data.flow.report.nullable.methods.that.always.return.a.non.null.value=Report nullable methods that always return a non-null value inspection.data.flow.report.problems.that.happen.only.on.some.code.paths=Report problems that happen only on some code paths inspection.data.flow.use.computeifpresent.quickfix=Replace 'compute' with 'computeIfPresent' @@ -1180,7 +1180,7 @@ quickfix.text.0.may.not.work.before.jdk.11.0.2={0} (may not work before JDK 11.0 quickfix.text.avoid.mutation.using.stream.api.0.operation=Avoid mutation using Stream API ''{0}()'' operation quickfix.text.remove.javadoc.0=Remove ''@{0}'' tag quickfix.text.remove.javadoc.0.1=Remove @{0} {1} -quickfix.text.remove.not.null.annotation=Remove not-null annotation +quickfix.text.remove.not.null.annotation=Remove non-null annotation quickfix.text.replace.0.stream.with.1.2=Replace {0}.stream() with {1}.{2}() quickfix.text.replace.collect.0.with.1.2=Replace ''collect({0}())'' with ''{1}''{2} quickfix.text.replace.filter.0.is.present.with.any.match=Replace ''filter().{0}().isPresent()'' with ''anyMatch()'' @@ -1697,8 +1697,8 @@ non.code.annotations.explanation.external.available=External annotations availab non.code.annotations.explanation.inferred.available=Inferred annotations available. non.code.annotations.explanation.full.signature=Full signature: type.migration.command.name=TypeMigration -dfa.constraint.not.null=not-null -dfa.constraint.0.not.null={0} (not-null) +dfa.constraint.not.null=non-null +dfa.constraint.0.not.null={0} (non-null) dfa.constraint.null.or.0=null or {0} label.class.pattern.syntax.explanation=Leave the method blank to represent constructors\nAny * will match against one or more characters in the qualified name (including dots) dialog.message.modules.dont.refer.to.existing.annotations.library={0, choice, 0#Module|2#Modules} {1} {0, choice, 0#doesn''t|2#don''t} refer to the existing ''{2}'' library with IntelliJ IDEA nullity annotations. Would you like to add the {0, choice, 0#dependency|2#dependencies} now? diff --git a/plugins/kotlin/idea/tests/testData/slicer/inflow/settersViaJavaDelegate.leafGroups.txt b/plugins/kotlin/idea/tests/testData/slicer/inflow/settersViaJavaDelegate.leafGroups.txt index f7a028b05363..2db0c08abd5e 100644 --- a/plugins/kotlin/idea/tests/testData/slicer/inflow/settersViaJavaDelegate.leafGroups.txt +++ b/plugins/kotlin/idea/tests/testData/slicer/inflow/settersViaJavaDelegate.leafGroups.txt @@ -2,7 +2,7 @@ 12 println("Now my name is '$name'") (in AClass.uses()) 5 var name by D() (in AClass) 9 JAVA: return _value; (in D.getValue(Object, KProperty)) -13 JAVA: _value = value; (in D.setValue(Object, KProperty, ...) (filter: not-null)) +13 JAVA: _value = value; (in D.setValue(Object, KProperty, ...) (filter: non-null)) 12 JAVA: void setValue(@Nullable Object thisRef, @NotNull KProperty property, @NotNull String value) { (in D.setValue(Object, KProperty, ...)) 5 var name by D() (in AClass.name) diff --git a/plugins/kotlin/idea/tests/testData/slicer/inflow/settersViaJavaDelegate.nullnessGroups.txt b/plugins/kotlin/idea/tests/testData/slicer/inflow/settersViaJavaDelegate.nullnessGroups.txt index 9be632c2aef7..78810a76e8c7 100644 --- a/plugins/kotlin/idea/tests/testData/slicer/inflow/settersViaJavaDelegate.nullnessGroups.txt +++ b/plugins/kotlin/idea/tests/testData/slicer/inflow/settersViaJavaDelegate.nullnessGroups.txt @@ -3,7 +3,7 @@ 12 println("Now my name is '$name'") (in AClass.uses()) 5 var name by D() (in AClass) 9 JAVA: return _value; (in D.getValue(Object, KProperty)) -13 JAVA: _value = value; (in D.setValue(Object, KProperty, ...) (filter: not-null)) +13 JAVA: _value = value; (in D.setValue(Object, KProperty, ...) (filter: non-null)) 12 JAVA: void setValue(@Nullable Object thisRef, @NotNull KProperty property, @NotNull String value) { (in D.setValue(Object, KProperty, ...)) 5 var name by D() (in AClass.name) 6 private String _value = ""; diff --git a/plugins/kotlin/idea/tests/testData/slicer/inflow/settersViaJavaDelegate.results.txt b/plugins/kotlin/idea/tests/testData/slicer/inflow/settersViaJavaDelegate.results.txt index e992c4060012..e4606f24da27 100644 --- a/plugins/kotlin/idea/tests/testData/slicer/inflow/settersViaJavaDelegate.results.txt +++ b/plugins/kotlin/idea/tests/testData/slicer/inflow/settersViaJavaDelegate.results.txt @@ -2,6 +2,6 @@ 5 var name by D() (in AClass) 9 JAVA: return _value; (in D.getValue(Object, KProperty)) 6 JAVA: private String _value = ""; (in D) -13 JAVA: _value = value; (in D.setValue(Object, KProperty, ...) (filter: not-null)) +13 JAVA: _value = value; (in D.setValue(Object, KProperty, ...) (filter: non-null)) 12 JAVA: void setValue(@Nullable Object thisRef, @NotNull KProperty property, @NotNull String value) { (in D.setValue(Object, KProperty, ...)) 5 var name by D() (in AClass.name)