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 `RedundantThrowsDeclaration` inspection violations.
Description:
>This inspection reports exceptions that are declared in a method's signature but never thrown by the method itself.
Fixes `UnnecessaryThis` inspection violations.
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 `SuspiciousGetterSetter` inspection violations.
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 `BooleanMethodNameMustStartWithQuestion` inspection violations.
Description:
>Reports boolean methods whose names do not start with a question word. Boolean methods that override library methods are ignored by this inspection.
Fixes some `WeakerAccess` inspection violations.
Description:
>This inspection reports all fields, methods or classes, found in the specified inspection scope, that may have their access modifier narrowed down.
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 some `SpellCheckingInspection` inspection violations.
Description:
>Spellchecker inspection helps locate typos and misspelling in your code, comments and literals, and fix them in one click.
Fixes `UnnecessaryThis` inspection violations.
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 `RedundantThrows` inspection violations.
Description:
>This inspection reports exceptions that are declared in a method's signature but never thrown by the method itself or its implementations/derivatives.
Fixes some `ImplicitDefaultCharsetUsage` inspection violations.
Description:
>Reports method and constructor calls which implicitly use the platform's default charset. These can produce different results on (e.g. foreign language) systems that use a different default charset, resulting in unexpected behaviour.
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 some `BooleanMethodNameMustStartWithQuestion` inspection violations.
Description:
>Reports boolean methods whose names do not start with a question word. Boolean methods that override library methods are ignored by this inspection
Fixes `MethodMayBeStatic` inspection violation introduced in recent commit.
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 `FieldMayBeStatic` inspection violations.
Description:
>Reports any instance variables which may safely be made static. A field may be static if it is declared final, and is initialized with a constant.
Fixes `DynamicRegexReplaceableByCompiledPattern` inspection violations.
Description:
>Reports calls to the regular expression methods of java.lang.String using constants arguments. Such calls may be profitably replaced with a private static final Pattern field so that the regular expression does not have to be compiled each time it is used.
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 `EmptyMethod` inspection violations in test code.
Description:
>This inspection reports methods where:
- method is empty OR
- all implementations of interface method are empty OR
- method is empty itself and is overridden only by empty methods
Note that a method containing only the super() call and passing its own parameter is also considered empty. This inspection is automatically suppressed for methods annotated with special annotations, for example, EJB annotations javax.ejb.Init and javax.ejb.Remove.
Fixes some `SpellDynamicRegexReplaceableByCompiledPattern` inspection violations.
Description:
>Reports calls to the regular expression methods of java.lang.String using constants arguments. Such calls may be profitably replaced with a private static final Pattern field so that the regular expression does not have to be compiled each time it is used.
Fixes `CallToSimpleGetterInClass` inspection violations.
Description:
>Reports any calls to a simple property getter from within the property's class. A simple property getter is defined as one which simply returns the value of a field, and does no other calculation. Such simple getter calls may be safely inlined, at a small performance improvement. Some coding standards also suggest against the use of simple getters for code clarity reasons.
These cases are covered by EqualsVerifier anyway.
Fixes `ObjectEqualsNull` inspection violations.
Description:
>Reports on calls to .equals() which have null as an argument. The semantics of such calls are almost certainly not what was intended.
Details:
```
java.lang.AssertionError: Subclass: equals is not final.
Supply an instance of a redefined subclass using withRedefinedSubclass if equals cannot be final.
```