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.
Fixes `ForCanBeForeach` inspection violations in test code.
Description:
>Reports for loops which iterate over collections or arrays, and can be replaced with the foreach iteration syntax, available in Java 5 and newer.
Fixes `UnnecessaryBoxing` inspection violations in test code.
Description:
>Reports "boxing", e.g. wrapping of primitive values in objects. Boxing is unnecessary under Java 5 and newer, and can be safely removed.
This inspection only reports if the project or module is configured to use a language level of 5.0 or higher.
Fixes `MethodCanBeVariableArityMethod` inspection violations in test code.
Description:
>Reports methods with which can be converted to be a variable arity/varargs method, available in Java 5 and newer.
This inspection only reports if the project or module is configured to use a language level of 5.0 or higher.
Fixes `HtmlTagCanBeJavadocTag` inspection violation 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 `AssertEqualsMayBeAssertSame` inspection violation in test code.
Description:
>Reports any calls to org.junit.Assert.assertEquals() or junit.framework.Assert.assertEquals() which can be replaced with an equivalent call to assertSame(). This is possible when the arguments are instances of a final class which does not override the equals() method.
Fixes `MisorderedAssertEqualsParameters` inspection violation in test code.
Description:
>Reports any calls to JUnit assertEquals() which have a non-literal as the expected result argument and a literal as the actual result argument. Such calls will behave fine for assertions which pass, but may give confusing error reports if their expected and actual arguments differ.
Fixes `InnerClassMayBeStatic` inspection violation in test code.
Description:
>Reports any inner classes which may safely be made static. An inner class may be static if it doesn't reference its enclosing instance.
A static inner class does not keep an implicit reference to its enclosing instance. This prevents a common cause of memory leaks and uses less memory per instance of the class.
Fixes `ConfusingFloatingPointLiteral` inspection violation in test code.
Description:
>Reports any floating point numbers which do not have a decimal point, numbers before the decimal point, and numbers after the decimal point. Such literals may be confusing, and violate several coding standards.
Fixes `ExceptionNameDoesntEndWithException` inspection violation in test code.
Description:
>Reports exception classes whose names don't end with 'Exception'.
Fixes `CallToSimpleSetterInClass` inspection violations.
Description:
>Reports any calls to a simple property setter from within the property's class. A simple property setter is defined as one which simply assigns the value of its parameter to a field, and does no other calculation. Such simple setter calls may be safely inlined, at a small performance improvement. Some coding standards also suggest against the use of simple setters for code clarity reasons.
Fixes `MethodMayBeStatic` inspection violations.
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 `StringConcatenationInFormatCall` inspection violations.
Description:
>Reports non-constant string concatenations used as a format string argument. Often this is the result of mistakenly concatenating a string format argument by typing a '+' when a ',' was meant. This inspection checks calls to appropriate methods on java.util.Formatter, java.lang.String, java.io.PrintWriter, or java.io.PrintStream.