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.
Fixes `ConstantConditions` inspection violations.
Description:
>This inspection analyzes method control and data flow to report possible conditions that are always true or false and expressions whose value is statically proven to be constant.
Fixes `NonSerializableFieldInSerializableClass` inspection violation.
Description:
>Reports non-synchronized methods overriding synchronized methods.
Fixes `NonSynchronizedMethodOverridesSynchronizedMethod` inspection violation.
Description:
>Reports non-Serializable fields in Serializable classes. Such fields will result in runtime exceptions if the object is serialized. Fields declared transient or static are not reported, nor are fields of classes which have defined a writeObject method. For purposes of this inspection, fields 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.
Fixes `ZeroLengthArrayInitialization` inspection violations.
Description:
>Reports on allocations of arrays with known lengths of zero. Since array lengths in Java are non-modifiable, it is almost always possible to share zero-length arrays, rather than repeatedly allocating new zero-length arrays. Such sharing may provide useful optimizations in program runtime or footprint. Note that this inspection does not report zero-length arrays allocated as static final fields, as it is assumed that those arrays are being used to implement array sharing.
Fixes `HtmlTagCanBeJavadocTag` inspection violations.
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 `NewExceptionWithoutArguments` inspection violation.
Description:
>Reports exception instance creation without any arguments specified. When an exception is constructed without arguments it contains no information about the fault that happened, which makes debugging needlessly hard.
Fixes `EnumSwitchStatementWhichMissesCases` inspection violation.
Description:
>Reports switch statements over enumerated types which do not include all of the enumerated type's elements as cases.
Fixes `NegatedConditional` inspection violations.
Description:
>Reports conditional expressions whose conditions are negated. Flipping the order of the conditional expression branches will usually increase the clarity of such statements.
Fixes `UnnecessaryThis` inspection violations after recent commits.
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.