diff --git a/java/java-impl/src/inspectionDescriptions/EqualsAndHashcode.html b/java/java-impl/src/inspectionDescriptions/EqualsAndHashcode.html
index 29837f4aa02c..91a210622874 100644
--- a/java/java-impl/src/inspectionDescriptions/EqualsAndHashcode.html
+++ b/java/java-impl/src/inspectionDescriptions/EqualsAndHashcode.html
@@ -4,7 +4,7 @@ Reports classes that override the
equals() method but do not override the
hashCode() method or vice versa, which could potentially lead to problems
when the class is added to a Collection or a HashMap.
-
There is a fix that generates stub for absent method.
+There is a fix that generates default implementation for absent method.
Example:
class StringHolder {
diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/AbstractClassWithOnlyOneDirectInheritor.html b/plugins/InspectionGadgets/src/inspectionDescriptions/AbstractClassWithOnlyOneDirectInheritor.html
index 370752958db0..a06c03c51a60 100644
--- a/plugins/InspectionGadgets/src/inspectionDescriptions/AbstractClassWithOnlyOneDirectInheritor.html
+++ b/plugins/InspectionGadgets/src/inspectionDescriptions/AbstractClassWithOnlyOneDirectInheritor.html
@@ -1,14 +1,15 @@
-
- This inspection is intended for Java ME and other highly resource constrained environments.
- Applying the results of this inspection without consideration might have negative effects on code clarity and design.
-
Reports abstract classes which have precisely one
direct inheritor. While such classes may offer admirable clarity of design,
in memory-constrained or bandwidth-limited environments, they needlessly increase
the total footprint of the application. Consider merging the abstract class with its inheritor.
+
+ This inspection is intended for Java ME and other highly resource constrained environments.
+ Applying the results of this inspection without consideration might have negative effects on code clarity and design.
+
+
Example:
abstract class Base {} // will be reported
diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/CollectionsMustHaveInitialCapacity.html b/plugins/InspectionGadgets/src/inspectionDescriptions/CollectionsMustHaveInitialCapacity.html
index 9af9f8b28f2d..ccaeff5ff0fd 100644
--- a/plugins/InspectionGadgets/src/inspectionDescriptions/CollectionsMustHaveInitialCapacity.html
+++ b/plugins/InspectionGadgets/src/inspectionDescriptions/CollectionsMustHaveInitialCapacity.html
@@ -6,10 +6,10 @@ to specify initial capacities for collections may result in performance issues,
memory copied when capacity is exceeded. This inspection checks allocations of the classes which are listed in inspection settings.
Example
- new <String, String>();
+ new HashMap<String, String>();
-Use the list to specify collection classes that should be checked.
-Use the checkbox to ignore field initializers.
+Use the list below to specify collection classes that should be checked.
+Use the checkbox below to ignore field initializers.
\ No newline at end of file
diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/LengthOneStringInIndexOf.html b/plugins/InspectionGadgets/src/inspectionDescriptions/LengthOneStringInIndexOf.html
index f074ade310f2..2d63cc435799 100644
--- a/plugins/InspectionGadgets/src/inspectionDescriptions/LengthOneStringInIndexOf.html
+++ b/plugins/InspectionGadgets/src/inspectionDescriptions/LengthOneStringInIndexOf.html
@@ -1,6 +1,6 @@
-Reports String literals of length one being used
+Reports single character string being used
as a parameter in String.indexOf() or
String.lastIndexOf() calls.
There is a fix that allows to replace these string literals with equivalent character literals, gaining some performance enhancement.
@@ -8,7 +8,7 @@ There is a fix that allows to replace these string literals with equivalent char
return s.indexOf("x");
-After applying the fix:
+After the quick-fix is applied:
return s.indexOf('x');
diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/NonSerializableObjectBoundToHttpSession.html b/plugins/InspectionGadgets/src/inspectionDescriptions/NonSerializableObjectBoundToHttpSession.html
index 6fc98d4909d8..78522374bf94 100644
--- a/plugins/InspectionGadgets/src/inspectionDescriptions/NonSerializableObjectBoundToHttpSession.html
+++ b/plugins/InspectionGadgets/src/inspectionDescriptions/NonSerializableObjectBoundToHttpSession.html
@@ -1,12 +1,11 @@
-Reports non-Serializable objects used as arguments to
+Reports objects not implementing java.io.Serializable used as arguments to
javax.servlet.http.HttpSession.setAttribute() or
javax.servlet.http.HttpSession.putValue().
-Such objects will not be serialized if the HttpSession is passivated or migrated, and may result in difficult-to-diagnose
-bugs. For purposes of this inspection, objects with java.util.Collection or
-java.util.Map types are assumed to be Serializable, unless the types
-they are declared to contain are non-Serializable.
+Such objects will not be serialized if the 'HttpSession' is passivated or migrated and may result in difficult-to-diagnose
+bugs. By default objects with java.util.Collection or
+java.util.Map types are assumed to be Serializable, unless type parameters are non-Serializable.
Example:
void foo(HttpSession session) {
diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ReadObjectInitialization.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ReadObjectInitialization.html
index cae01a55aa7e..90502ddde61c 100644
--- a/plugins/InspectionGadgets/src/inspectionDescriptions/ReadObjectInitialization.html
+++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ReadObjectInitialization.html
@@ -4,8 +4,8 @@ Reports fields which are not guaranteed to be initialized after the object is
deserialized by the readObject() method.
Inspection doesn't report transient fields.
- Note: This inspection uses a very conservative dataflow algorithm, and may report instance variables
- as uninitialized incorrectly. Variables reported as initialized will always be initialized.
+ Note: This inspection uses a very conservative control flow algorithm, and may report fields
+ as uninitialized incorrectly.
Example of the reported code:
diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/RuntimeExecWithNonConstantString.html b/plugins/InspectionGadgets/src/inspectionDescriptions/RuntimeExecWithNonConstantString.html
index 22fc35ab5fa0..fc59bd25006f 100644
--- a/plugins/InspectionGadgets/src/inspectionDescriptions/RuntimeExecWithNonConstantString.html
+++ b/plugins/InspectionGadgets/src/inspectionDescriptions/RuntimeExecWithNonConstantString.html
@@ -1,21 +1,20 @@
-Reports calls to java.lang.Runtime.exec() or any
-of its variants which take a dynamically-constructed string as the command to execute.
+Reports calls to java.lang.Runtime.exec which take a dynamically-constructed string as the command to execute.
Constructed execution strings are a common source of security breaches.
By default this inspection ignores compile-time constants.
-Example
+Example of the reported code:
- String i = getUserInput();
- Runtime runtime = Runtime.getRuntime();
- runtime.exec("foo" + i); // reports warning
+ String i = getUserInput();
+ Runtime runtime = Runtime.getRuntime();
+ runtime.exec("foo" + i); // reports warning
Use the checkbox below to consider any static final fields as constant.
Be careful, because strings like the following will be ignored when the option is enabled:
- private static final String COMMAND = "ping " + getDomainFromUserInput() + "'";
+ static final String COMMAND = "ping " + getDomainFromUserInput() + "'";
diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/SingleCharacterStartsWith.html b/plugins/InspectionGadgets/src/inspectionDescriptions/SingleCharacterStartsWith.html
index 94ce6777fecd..f50ac84b5233 100644
--- a/plugins/InspectionGadgets/src/inspectionDescriptions/SingleCharacterStartsWith.html
+++ b/plugins/InspectionGadgets/src/inspectionDescriptions/SingleCharacterStartsWith.html
@@ -1,27 +1,27 @@
+Reports any calls to String.startsWith() or
+String.endsWith() where single character string literals passed as a parameter.
+There is a fix that replaces such calls with more efficiently implemented String.charAt().
+Because the performance gain is minimal and the code becomes less readable because of the extra non-zero length check,
+it is recommended to do so only inside tight loops.
This inspection is intended for Java ME and other highly resource constrained environments.
Applying the results of this inspection without consideration might have negative effects on code clarity and design.
-Reports any calls to String.startsWith() or
-String.endsWith() which are passed single character string
-literals as parameter.
-There is a fix that replace such calls with more efficiently implemented String.charAt().
-Because the performance gain is minimal, the needed extra check for non-zero length, and the negative effect on
-code clarity, it is recommended to do so only inside tight loops.
-Example
+Example:
boolean startsWithX(String s) {
return s.startsWith("x");
}
-After applying the fix:
+After the quick-fix is applied:
boolean startsWithX(String s) {
return !s.isEmpty() && s.charAt(0) == 'x';
}
+