From af042e1eb6f9f950c3b90101f0b4355f35ae60a2 Mon Sep 17 00:00:00 2001 From: Louis Vignier Date: Fri, 19 Mar 2021 19:29:46 +0100 Subject: [PATCH] IJ-CR-7352 [java] Fix inspection descriptions GitOrigin-RevId: 6690332575359f1f9bab67d976756c570004179e --- .../inspectionDescriptions/ComparatorCombinators.html | 2 +- .../src/inspectionDescriptions/DuplicateThrows.html | 2 +- .../EqualsOnSuspiciousObject.html | 2 +- .../InvalidComparatorMethodReference.html | 4 +++- .../Java8CollectionRemoveIf.html | 2 +- .../inspectionDescriptions/OverflowingLoopIndex.html | 2 +- .../src/inspectionDescriptions/RecordCanBeClass.html | 6 +++--- .../RedundantComparatorComparing.html | 2 +- .../inspectionDescriptions/RedundantCompareCall.html | 4 ++-- .../inspectionDescriptions/SafeVarargsDetector.html | 8 ++++---- .../inspectionDescriptions/SuspiciousMethodCalls.html | 10 ++++------ .../src/inspectionDescriptions/TextBlockMigration.html | 4 ++-- .../inspectionDescriptions/UnresolvedPropertyKey.html | 2 +- .../src/inspectionDescriptions/UseCompareMethod.html | 10 +++++++--- .../afterComparingMapEntry.java | 2 +- .../afterComparingMinMaxReversed.java | 2 +- .../beforeComparingMapEntry.java | 2 +- .../beforeComparingMinMaxReversed.java | 2 +- java/openapi/resources/messages/JavaBundle.properties | 6 +++--- .../BigDecimalMethodWithoutRoundingCalled.html | 2 +- .../BooleanMethodIsAlwaysInverted.html | 3 +-- .../EqualsBetweenInconvertibleTypes.html | 2 +- .../IfStatementWithIdenticalBranches.html | 2 +- .../MethodCanBeVariableArityMethod.html | 2 +- .../NonAtomicOperationOnVolatileField.html | 2 +- .../UnnecessaryLocalVariable.html | 3 +-- .../UnnecessaryTemporaryOnConversionToString.html | 2 +- .../JUnit5MalformedParameterized.html | 2 +- 28 files changed, 48 insertions(+), 46 deletions(-) diff --git a/java/java-impl/src/inspectionDescriptions/ComparatorCombinators.html b/java/java-impl/src/inspectionDescriptions/ComparatorCombinators.html index 913ff66c193c..23a03e4e7971 100644 --- a/java/java-impl/src/inspectionDescriptions/ComparatorCombinators.html +++ b/java/java-impl/src/inspectionDescriptions/ComparatorCombinators.html @@ -3,7 +3,6 @@ Reports cases where a Comparator is defined as a lambda expression which could be expressed using methods like Comparator.comparing(). This inspection also reports chain comparisons which can be replaced by Comparator.thenComparing(). -

Example:

   myList.sort((person1, person2) -> person1.getName().compareTo(person2.getName()));
@@ -23,6 +22,7 @@ This inspection also reports chain comparisons which can be replaced by Co
                          .thenComparing(Person::second)
                          .thenComparingInt(Person::third));
 
+

New in 2016.3

\ No newline at end of file diff --git a/java/java-impl/src/inspectionDescriptions/DuplicateThrows.html b/java/java-impl/src/inspectionDescriptions/DuplicateThrows.html index cc39f6fd3bb4..d60ed6122b2a 100644 --- a/java/java-impl/src/inspectionDescriptions/DuplicateThrows.html +++ b/java/java-impl/src/inspectionDescriptions/DuplicateThrows.html @@ -1,7 +1,6 @@ Reports duplicate exceptions in a method throws list. -

Example:

   void f() throws Exception, Exception {}
@@ -10,6 +9,7 @@ Reports duplicate exceptions in a method throws list.
 
   void f() throws Exception {}
 
+

Use the checkbox below to ignore exceptions subclassing others.

diff --git a/java/java-impl/src/inspectionDescriptions/EqualsOnSuspiciousObject.html b/java/java-impl/src/inspectionDescriptions/EqualsOnSuspiciousObject.html index fd46d397c5ab..fa41302fc4de 100644 --- a/java/java-impl/src/inspectionDescriptions/EqualsOnSuspiciousObject.html +++ b/java/java-impl/src/inspectionDescriptions/EqualsOnSuspiciousObject.html @@ -3,13 +3,13 @@ Reports when equals() is called on specific classes like StringBuilder or StringBuffer. The equals() method is not overridden in these classes, so may return false even when the contents of two objects are the same. If reference equality is intended, it's better to use == to avoid confusion. -

Example:

   public void test(StringBuilder sb1, StringBuilder sb2) {
     boolean result = sb1.equals(sb2); // Suspicious
   }
 
+

New in 2017.2

\ No newline at end of file diff --git a/java/java-impl/src/inspectionDescriptions/InvalidComparatorMethodReference.html b/java/java-impl/src/inspectionDescriptions/InvalidComparatorMethodReference.html index a526716117fc..12b7cf634618 100644 --- a/java/java-impl/src/inspectionDescriptions/InvalidComparatorMethodReference.html +++ b/java/java-impl/src/inspectionDescriptions/InvalidComparatorMethodReference.html @@ -5,15 +5,17 @@ Reports method references mapped to the Comparator interface which Some method references like Integer::max can be mapped to the Comparator interface. However using them as Comparator is meaningless and the result might be unpredictable.

-

Example:

+  ArrayList<Integer> ints = foo();
   ints.sort(Math::min);
 

After the quick-fix is applied, the result looks like this:

+  ArrayList<Integer> ints = foo();
   ints.sort(Comparator.reverseOrder());
 
+

New in 2016.3

\ No newline at end of file diff --git a/java/java-impl/src/inspectionDescriptions/Java8CollectionRemoveIf.html b/java/java-impl/src/inspectionDescriptions/Java8CollectionRemoveIf.html index acec8e7f9db0..0e94bf99718a 100644 --- a/java/java-impl/src/inspectionDescriptions/Java8CollectionRemoveIf.html +++ b/java/java-impl/src/inspectionDescriptions/Java8CollectionRemoveIf.html @@ -1,7 +1,6 @@ Reports loops which can be collapsed into a single Collection.removeIf call. -

Example:

   for (Iterator<String> it = collection.iterator(); it.hasNext(); ) {
@@ -15,6 +14,7 @@ Reports loops which can be collapsed into a single Collection.removeIf
   collection.removeIf(aValue -> shouldBeRemoved(aValue));
 
+

This inspection only reports if the language level of the project or module is 8 or higher

diff --git a/java/java-impl/src/inspectionDescriptions/OverflowingLoopIndex.html b/java/java-impl/src/inspectionDescriptions/OverflowingLoopIndex.html index 95c612518263..5b9d16c935af 100644 --- a/java/java-impl/src/inspectionDescriptions/OverflowingLoopIndex.html +++ b/java/java-impl/src/inspectionDescriptions/OverflowingLoopIndex.html @@ -2,7 +2,6 @@ Reports loops that cannot complete without an index overflow or that don't loop at all. It usually happens because of a mistake in the update operation. -

Example:

   void foo(int s) {
@@ -11,6 +10,7 @@ It usually happens because of a mistake in the update operation.
     }
   }
 
+

New in 2019.1

\ No newline at end of file diff --git a/java/java-impl/src/inspectionDescriptions/RecordCanBeClass.html b/java/java-impl/src/inspectionDescriptions/RecordCanBeClass.html index 303c21a9b17a..859acd17fa38 100644 --- a/java/java-impl/src/inspectionDescriptions/RecordCanBeClass.html +++ b/java/java-impl/src/inspectionDescriptions/RecordCanBeClass.html @@ -1,6 +1,6 @@ -Suggests to replace a record by an ordinary class. +Suggests to replace a record by an ordinary class. This inspection makes it possible to move a Java record to a codebase using an earlier Java version.

Note that the resulting class is not completely equivalent to the original record: @@ -20,7 +20,7 @@ This inspection makes it possible to move a Java record to a codebase using an e

   record Point(int x, int y) {}
 
-

This record will be converted to:

+

After the quick-fix is applied, the result looks like this:

   final class Point {
     private final int x;
@@ -57,7 +57,7 @@ This inspection makes it possible to move a Java record to a codebase using an e
     }
   }
 
-

This inspection only applies from language level 15 preview.

+

This inspection only reports if the language level of the project or module is 15 preview or higher.

New in 2020.3

\ No newline at end of file diff --git a/java/java-impl/src/inspectionDescriptions/RedundantComparatorComparing.html b/java/java-impl/src/inspectionDescriptions/RedundantComparatorComparing.html index 0d3b38038f9c..3ecb23a68b61 100644 --- a/java/java-impl/src/inspectionDescriptions/RedundantComparatorComparing.html +++ b/java/java-impl/src/inspectionDescriptions/RedundantComparatorComparing.html @@ -1,7 +1,6 @@ Reports redundant Comparator combinator constructs which can be simplified. -

Example:

   c.thenComparing(Comparator.comparing(function));
@@ -18,6 +17,7 @@ Reports redundant Comparator combinator constructs which can be sim
 
   Collections.min(list, Comparator.naturalOrder());
 
+

New in 2018.1

\ No newline at end of file diff --git a/java/java-impl/src/inspectionDescriptions/RedundantCompareCall.html b/java/java-impl/src/inspectionDescriptions/RedundantCompareCall.html index 96dfbd9571a9..bbc5ff64ab08 100644 --- a/java/java-impl/src/inspectionDescriptions/RedundantCompareCall.html +++ b/java/java-impl/src/inspectionDescriptions/RedundantCompareCall.html @@ -1,7 +1,6 @@ -Reports comparisons where the compare function is superfluous. - +Reports comparisons where the compare method is superfluous.

Example:

   boolean result = Integer.compare(a, b) == 0;
@@ -10,6 +9,7 @@ Reports comparisons where the compare function is superfluous.
 
   boolean result = a == b;
 
+

New in 2018.2

\ No newline at end of file diff --git a/java/java-impl/src/inspectionDescriptions/SafeVarargsDetector.html b/java/java-impl/src/inspectionDescriptions/SafeVarargsDetector.html index 0356f6eda5b4..070e8e86eafd 100644 --- a/java/java-impl/src/inspectionDescriptions/SafeVarargsDetector.html +++ b/java/java-impl/src/inspectionDescriptions/SafeVarargsDetector.html @@ -2,11 +2,10 @@ Reports all methods with variable arity which can be annotated as @SafeVarargs. @SafeVarargs annotation suppresses unchecked warnings about parameterized array creation at call sites. -

Example:

   public class Foo<T> {
-    private List<T> list = new ArrayList<>();
+    private List<T> list = new ArrayList<>();
 
     public final void safeVarargs(T... elements) {
       Collections.addAll(list, elements);
@@ -15,8 +14,8 @@ Reports all methods with variable arity which can be annotated as @SafeVar
 

After the quick-fix is applied, the result looks like this:

-  public class Foo<T> {
-    private List<T> list = new ArrayList<>();
+  public class Foo<T> {
+    private List<T> list = new ArrayList<>();
 
     @SafeVarargs
     public final void safeVarargs(T... elements) {
@@ -27,5 +26,6 @@ Reports all methods with variable arity which can be annotated as @SafeVar
 

This annotation is not supported under Java 1.6 or earlier JVMs.

+ \ No newline at end of file diff --git a/java/java-impl/src/inspectionDescriptions/SuspiciousMethodCalls.html b/java/java-impl/src/inspectionDescriptions/SuspiciousMethodCalls.html index 7bff9277d61f..0966d6aa2256 100644 --- a/java/java-impl/src/inspectionDescriptions/SuspiciousMethodCalls.html +++ b/java/java-impl/src/inspectionDescriptions/SuspiciousMethodCalls.html @@ -2,21 +2,19 @@ Reports method calls to parameterized collections, where actual argument type does not correspond to the collection's elements type. - -

For example if you have the following code:

+

Example:

   List<Integer> list = getListOfElements();
-  list.remove("");
+  list.remove(""); // remove is highlighted
 
-

- the call to remove() will be highlighted. +

The option 'Report suspicious but possibly correct method calls' makes it possible to ignore potentially correct code, like this:

   Number number = new Integer(0);
-  list.remove(number));
+  list.remove(number);
 
diff --git a/java/java-impl/src/inspectionDescriptions/TextBlockMigration.html b/java/java-impl/src/inspectionDescriptions/TextBlockMigration.html index 80b9930e63c7..555cd0641e35 100644 --- a/java/java-impl/src/inspectionDescriptions/TextBlockMigration.html +++ b/java/java-impl/src/inspectionDescriptions/TextBlockMigration.html @@ -10,7 +10,6 @@ Requirements:

Use the Apply to single string literals option to suggest the fix for single literals containing line breaks.

-

Example:

   String html = "<html>\n" +
@@ -29,7 +28,8 @@ Use the Apply to single string literals option to suggest the fix for sin
                 </html>
                 """;
 
-

This inspection only reports if the configured language level is 15 or higher.

+ +

This inspection only reports if the language level of the project or module is 15 or higher.

New in 2019.3

\ No newline at end of file diff --git a/java/java-impl/src/inspectionDescriptions/UnresolvedPropertyKey.html b/java/java-impl/src/inspectionDescriptions/UnresolvedPropertyKey.html index 37ff256bb129..1983450dad3b 100644 --- a/java/java-impl/src/inspectionDescriptions/UnresolvedPropertyKey.html +++ b/java/java-impl/src/inspectionDescriptions/UnresolvedPropertyKey.html @@ -1,6 +1,6 @@ -Reports invalid arguments passed to functions with parameters annotated as @PropertyKey. +Reports invalid arguments passed to methods with parameters annotated as @PropertyKey. These arguments should be valid property keys in the respective properties files. Also verifies that the resourceBundle argument of the @PropertyKey annotation is an existing resource bundle. diff --git a/java/java-impl/src/inspectionDescriptions/UseCompareMethod.html b/java/java-impl/src/inspectionDescriptions/UseCompareMethod.html index 15f04225196d..95a7f847589e 100644 --- a/java/java-impl/src/inspectionDescriptions/UseCompareMethod.html +++ b/java/java-impl/src/inspectionDescriptions/UseCompareMethod.html @@ -3,15 +3,19 @@ Reports cases where the static Integer.compare() method or similar methods can be used instead of more verbose or less efficient constructs. If x and y are already boxed integers, then x.compareTo(y) is suggested. -

Example:

-  int z = x > y ? 1 : x < y ? -1 : 0;
+  public int compare(int x, int y) {
+    return x > y ? 1 : x < y ? -1 : 0;
+  }
 

After the quick-fix is applied, the result looks like this:

-  int z = Integer.compare(x, y);
+  public int compare(int x, int y) {
+    return Integer.compare(x, y);
+  }
 
+

Double.compare and Float.compare methods appeared in Java 1.4, methods for other primitive types are available since Java 1.7. diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/comparatorCanBeSimplified/afterComparingMapEntry.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/comparatorCanBeSimplified/afterComparingMapEntry.java index 5d9ead80c739..e845e58667a6 100644 --- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/comparatorCanBeSimplified/afterComparingMapEntry.java +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/comparatorCanBeSimplified/afterComparingMapEntry.java @@ -1,4 +1,4 @@ -// "Fix all 'Comparator function can be simplified' problems in file" "true" +// "Fix all 'Comparator method can be simplified' problems in file" "true" import java.util.*; import java.util.Map.Entry; import java.util.stream.Collectors; diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/comparatorCanBeSimplified/afterComparingMinMaxReversed.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/comparatorCanBeSimplified/afterComparingMinMaxReversed.java index 38d7ed205950..f7ed8d1557a8 100644 --- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/comparatorCanBeSimplified/afterComparingMinMaxReversed.java +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/comparatorCanBeSimplified/afterComparingMinMaxReversed.java @@ -1,4 +1,4 @@ -// "Fix all 'Comparator function can be simplified' problems in file" "true" +// "Fix all 'Comparator method can be simplified' problems in file" "true" import java.util.*; import java.util.stream.*; diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/comparatorCanBeSimplified/beforeComparingMapEntry.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/comparatorCanBeSimplified/beforeComparingMapEntry.java index bbd133ae849d..5a0f199d484a 100644 --- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/comparatorCanBeSimplified/beforeComparingMapEntry.java +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/comparatorCanBeSimplified/beforeComparingMapEntry.java @@ -1,4 +1,4 @@ -// "Fix all 'Comparator function can be simplified' problems in file" "true" +// "Fix all 'Comparator method can be simplified' problems in file" "true" import java.util.*; import java.util.Map.Entry; import java.util.stream.Collectors; diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/comparatorCanBeSimplified/beforeComparingMinMaxReversed.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/comparatorCanBeSimplified/beforeComparingMinMaxReversed.java index 27c92d859f55..3f4c1d7a71dd 100644 --- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/comparatorCanBeSimplified/beforeComparingMinMaxReversed.java +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/comparatorCanBeSimplified/beforeComparingMinMaxReversed.java @@ -1,4 +1,4 @@ -// "Fix all 'Comparator function can be simplified' problems in file" "true" +// "Fix all 'Comparator method can be simplified' problems in file" "true" import java.util.*; import java.util.stream.*; diff --git a/java/openapi/resources/messages/JavaBundle.properties b/java/openapi/resources/messages/JavaBundle.properties index 64ed5d36d7fc..abfecd098cfc 100644 --- a/java/openapi/resources/messages/JavaBundle.properties +++ b/java/openapi/resources/messages/JavaBundle.properties @@ -668,15 +668,15 @@ inspection.same.parameter.fix.name=Inline value ''{1}'' for parameter ''{0}'' inspection.same.parameter.problem.descriptor=Actual value of parameter ''{0}'' is always ''{1}'' inspection.scope.for.title=Scope inspection.simplifiable.comparator.comparing.message=Unnecessary ''{0}()'' call -inspection.simplifiable.comparator.display.name=Comparator function can be simplified +inspection.simplifiable.comparator.display.name=Comparator method can be simplified inspection.simplifiable.comparator.entry.comparator.message=''{0}'' can be used instead inspection.simplifiable.comparator.fix.comparing.family.name=Remove redundant call inspection.simplifiable.comparator.fix.entry.comparator.family.name=Use predefined 'Map.Entry' comparator inspection.simplifiable.comparator.fix.remove.name=Remove ''{0}()'' call inspection.simplifiable.comparator.fix.replace.name=Remove ''{0}()'' call and use ''{1}()'' -inspection.simplifiable.comparator.fix.reversed.family.name=Simplify comparator function replacing 'max' with 'min' +inspection.simplifiable.comparator.fix.reversed.family.name=Simplify comparator method replacing 'max' with 'min' inspection.simplifiable.comparator.fix.reversed.name=Replace with ''{0}'' simplifying the comparator -inspection.simplifiable.comparator.reversed.message=Comparator function can be simplified if ''{0}()'' call is replaced with ''{1}()'' +inspection.simplifiable.comparator.reversed.message=Comparator method can be simplified if ''{0}()'' call is replaced with ''{1}()'' inspection.simplify.collector.fix.family.name=Simplify cascaded collector inspection.simplify.collector.fix.name=Use ''Collectors.{0}'' collector inspection.simplify.collector.message=Can be simplified using ''{0}'' collector diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/BigDecimalMethodWithoutRoundingCalled.html b/plugins/InspectionGadgets/src/inspectionDescriptions/BigDecimalMethodWithoutRoundingCalled.html index 447e47988d87..6aea6704d513 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/BigDecimalMethodWithoutRoundingCalled.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/BigDecimalMethodWithoutRoundingCalled.html @@ -4,10 +4,10 @@ Reports calls to divide() or setScale() without a roun Such calls can lead to an ArithmeticException when the exact value cannot be represented in the result (e.g. because it has a non-terminating decimal expansion). Specifying a rounding mode prevents the ArithmeticException. -

Example:

   BigDecimal.valueOf(1).divide(BigDecimal.valueOf(3));
 
+ \ No newline at end of file diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/BooleanMethodIsAlwaysInverted.html b/plugins/InspectionGadgets/src/inspectionDescriptions/BooleanMethodIsAlwaysInverted.html index 920b35772d4b..8c2198090ef9 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/BooleanMethodIsAlwaysInverted.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/BooleanMethodIsAlwaysInverted.html @@ -2,7 +2,6 @@ Reports methods with a boolean return type, which are only used in a negated context. Due to performance reasons some methods might not be reported during in-editor highlighting. -

Example:

   class C {
@@ -33,6 +32,6 @@ Due to performance reasons some methods might not be reported during in-editor h
     boolean member = notInvertedAnymore();
   }
 
- + diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/EqualsBetweenInconvertibleTypes.html b/plugins/InspectionGadgets/src/inspectionDescriptions/EqualsBetweenInconvertibleTypes.html index 5e0d2f58df43..6b77b9b087d5 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/EqualsBetweenInconvertibleTypes.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/EqualsBetweenInconvertibleTypes.html @@ -3,10 +3,10 @@ Reports calls to equals() where the target and argument are of incompatible types. While such a call might theoretically be useful, most likely it represents a bug. -

Example:

   new HashSet<String>() {}.equals(new TreeSet<Integer>());
 
+ \ No newline at end of file diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/IfStatementWithIdenticalBranches.html b/plugins/InspectionGadgets/src/inspectionDescriptions/IfStatementWithIdenticalBranches.html index 8b488911592f..9e10fa482abb 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/IfStatementWithIdenticalBranches.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/IfStatementWithIdenticalBranches.html @@ -2,7 +2,6 @@ Reports if statements where common parts can be extracted from the branches. These common parts are independent from the condition and make if statements harder to understand. -

Example:

   if (x > 12) {
@@ -25,6 +24,7 @@ These common parts are independent from the condition and make if s
   }
   doSomethingAfter();
 
+

Updated in 2018.1

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/MethodCanBeVariableArityMethod.html b/plugins/InspectionGadgets/src/inspectionDescriptions/MethodCanBeVariableArityMethod.html index 5f4a604af30a..571cae1285ec 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/MethodCanBeVariableArityMethod.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/MethodCanBeVariableArityMethod.html @@ -1,7 +1,6 @@ Reports methods which can be converted to a variable arity method. -

Example:

   void process(String name, Object[] objects);
@@ -10,6 +9,7 @@ Reports methods which can be converted to a variable arity method.
 
   void process(String name, Object... objects);
 
+

This inspection only reports if the language level of the project or module is 5 or higher.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/NonAtomicOperationOnVolatileField.html b/plugins/InspectionGadgets/src/inspectionDescriptions/NonAtomicOperationOnVolatileField.html index 7a9e558a39be..32fb2dbf6dc7 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/NonAtomicOperationOnVolatileField.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/NonAtomicOperationOnVolatileField.html @@ -6,7 +6,6 @@ the value is used to update the field. It is possible for the value of the field to change between the read and the write, possibly invalidating the operation. The non-atomic operation can be avoided by surrounding it with a synchronized block or by making use of one of the classes from the java.util.concurrent.atomic package. -

Example:

   private volatile int v = 1;
@@ -15,5 +14,6 @@ by making use of one of the classes from the java.util.concurrent.atomic
+
 
 
\ No newline at end of file
diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryLocalVariable.html b/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryLocalVariable.html
index 7581d84060cc..3424d75270a7 100644
--- a/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryLocalVariable.html
+++ b/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryLocalVariable.html
@@ -4,7 +4,6 @@ Reports unnecessary local variables, which add nothing to the comprehensibility
 Variables caught include local variables which are immediately returned,
 local variables that are immediately assigned to another variable and then not used,
 and local variables which always have the same value as another local variable or parameter.
-
 

Example:

   boolean yes() {
@@ -25,6 +24,6 @@ and local variables which always have the same value as another local variable o
 

Use the second checkbox below to have this inspection ignore annotated variables.

- + \ No newline at end of file diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryTemporaryOnConversionToString.html b/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryTemporaryOnConversionToString.html index f2d798d78c58..b29e45565a55 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryTemporaryOnConversionToString.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/UnnecessaryTemporaryOnConversionToString.html @@ -2,7 +2,6 @@ Reports unnecessary creation of temporary objects when converting from a primitive type to a String. -

Example:

   String foo = new Integer(3).toString();
@@ -11,5 +10,6 @@ from a primitive type to a String.
 
   String foo = Integer.toString(3);
 
+ \ No newline at end of file diff --git a/plugins/junit/src/inspectionDescriptions/JUnit5MalformedParameterized.html b/plugins/junit/src/inspectionDescriptions/JUnit5MalformedParameterized.html index 38063514eaab..755a39f3b25d 100644 --- a/plugins/junit/src/inspectionDescriptions/JUnit5MalformedParameterized.html +++ b/plugins/junit/src/inspectionDescriptions/JUnit5MalformedParameterized.html @@ -12,7 +12,6 @@ Reports parameterized tests which have malformed sources: No sources are defined. -

Example:

   class Test {
@@ -33,6 +32,7 @@ Reports parameterized tests which have malformed sources:
     void foo(String param) {}
   }
 
+

New in 2017.2