Fixes `LengthOneStringInIndexOf` inspection violations in test code.
Description:
>Reports String literals of length one being used as a parameter in String.indexOf() or String.lastIndexOf() calls. These String literals may be replaced by equivalent character literals, gaining some performance enhancement.
Fixes `MismatchedArrayReadWrite` inspection violations in test code.
Description:
>Reports any array fields or variables whose contents are read but not written, or written but not read. Such mismatched reads and writes are pointless, and probably indicate dead, incomplete or erroneous code.
Fixes `UnusedAssignment` inspection violations in test code.
Description:
>This inspection points out the cases where a variable value is never used after its assignment, i.e.:
- the variable never gets read after assignment OR
- the value is always overwritten with another assignment before the next variable read OR
- the variable initializer is redundant (for one of the above two reasons) OR
- the variable is never used.
Fixes `RedundantArrayCreation` inspection violations in test code introduced after recent commits.
Description:
>This inspection reports unnecessary creation of array expression to be passed as an argument to varargs parameter.
Fixes `AnonymousClassVariableHidesContainingMethodVariable` inspection violations in test code introduced after recent commits.
Description:
>Reports anonymous class variables being named identically to variables of a containing method or lambda expression. Such a variable name may be confusing.
Fixes `MethodMayBeStatic` inspection violations in test code introduced after recent commits.
Description:
>Reports any methods which may safely be made static. A method may be static if it is not synchronized, it does not reference any of its class' non static methods and non static fields and is not overridden in a sub class.
Fixes `MissingOverrideAnnotation` inspection violations in test code.
Description:
>Reports any methods which override methods in a superclass but do not have the @java.lang.Override annotation.
This inspection only reports if the project or module is configured to use a language level of 5.0 or higher.
Fixes ` UnusedMessageFormatParameter` inspection violation introduced in #1648.
Description:
>This inspection reports properties values which looks like java.text.MessageFormat format strings but do not use some of the parameters of {xx} kind.
For example:
```
# parameter {0} is not used
error.message=Something happened in line {1}
```
Fixes `ArraysAsListWithZeroOrOneArgument` inspection violations in test code.
Description:
>Reports any calls to Arrays.asList() with zero arguments or only one argument. Such calls could be replaced with either a call to Collections.singletonList() or Collections.emptyList() which will save some memory.
Fixes `SuspiciousGetterSetter` inspection violations in IndentationCheck.
Description:
>Reports suspicious getter or setter methods. A getter or setter is suspicious if it accesses a different field than would be expected by its name.
Fixes `UpperCaseFieldNameNotConstant` inspection violations in test code.
Description:
>Reports non-static non-final fields whose names are all upper-case. Such fields may cause confusion by breaking a common naming convention, and are often the result of developer error.
Fixes `QuestionableName` inspection violations in test code.
Description:
>Reports on any variables, methods, or classes with questionable names. This inspection is best used to report common metasyntactic variables which may be used as names by lazy or confused developers.
Fixes `UnnecessaryExplicitNumericCast` inspection violations in test code.
Description:
>Reports any primitive numeric casts which would otherwise be inserted implicitly by the compiler.
Fixes ` FieldCanBeLocal` inspection violation.
Description:
>This inspection searches for redundant class fields that can be replaced with local variables. If all local usages of a field are preceded by assignments to that field, the field can be removed and its usages replaced with local variables.
Fixes `RedundantSuppression` inspection violations in test code.
Description:
>This inspection reports usages of
@SuppressWarning annotation, or
// noinspection line comment, or
/** noinspection */ JavaDoc comment
which can be safely removed because inspection they affect is no longer applicable in this context.
Fixes `AssertEqualsCalledOnArray` inspection violations in test code.
Description:
>Reports any calls to JUnit's assertEquals() method with arguments of type array. Arrays should be checked with one of the assertArrayEquals() methods.
Fixes `UnnecessaryInheritDoc` inspection violations in test code.
Description:
>Reports any Javadoc comments which contain only the {@inheritDoc} tag. Since Javadoc copies the super class' comment if no comment is present, a comment containing only an {@inheritDoc} adds nothing.
Fixes `HtmlTagCanBeJavadocTag` inspection violations in test code.
Description:
>Reports use of <code> tags in Javadoc comments. Since JDK1.5 these constructs may be replaced with {@code ...} constructs. This allows the use of angle brackets (<, >) inside the comment, instead of HTML character entities.
Fixes `UnnecessaryThis` inspection violations in test code.
Description:
>Reports on any unnecessary uses of this in the code. Using this to disambiguate a code reference may easily become unnecessary via automatic refactorings, and is discouraged by many coding styles.
Fixes `FieldCanBeLocal` inspection violation in test code.
Description:
>This inspection searches for redundant class fields that can be replaced with local variables. If all local usages of a field are preceded by assignments to that field, the field can be removed and its usages replaced with local variables.
Fixes `ClassWithOnlyPrivateConstructors` inspection violation in test code.
Description:
>Reports classes with only private constructors that are not extended by any nested class. Such classes can not be extended and should be declared final.
Fixes `AnonymousClassMethodCount` inspection violation in test code.
Description:
>Reports anonymous inner class with too many methods. Anonymous classes with more than a very low number of methods may be difficult to understand, and should probably be promoted to become named inner classes.
Fixes `NestedAssignment` inspection violation in test code.
Description:
>Reports assignment expressions nested inside other expressions. While admirably terse, such expressions may be confusing, and violate the general design principle that a given construct should do precisely one thing.
Fixes `SimplifiableJUnitAssertion` inspection violation in test code.
Description:
>Reports any JUnit assertTrue calls which can be replaced by equivalent assertEquals calls. assertEquals calls will normally give better error messages in case of test failure than assertTrue can.
Fixes `ObjectToString` inspection violations.
Description:
>Reports any calls to .toString() which use the default implementation from java.lang.Object. The default implementation is rarely desired, but easy to use by accident. Calls to .toString() on objects of type java.lang.Object are ignored by this inspection.
Fixes `PublicConstructorInNonPublicClass` inspection violations.
Description:
>Reports all constructors in non-public classes that are declared public.
Fixes `ConstantNamingConvention` inspection violation in test code.
Description:
>Reports any constants whose names are either too short, too long, or do not follow the specified regular expression pattern. Constants are fields declared static final.
Fixes `UtilityClassWithoutPrivateConstructor` inspection violation.
Description:
>Reports utility classes which do not have private constructors. Utility classes have all fields and methods declared static. Giving such classes a private constructor prevents them from being inadvertently instantiated.
Fixes `Convert2Diamond` inspection violations.
Description:
>This inspection reports all new expressions with type arguments which can be replaced with diamond type <>
Such <> syntax is not supported under Java 1.6 or earlier JVMs.