Fixes `DeclareCollectionAsInterface` inspection violations.
Description:
>Reports on declarations of Collection variables made by using the collection class as the type, rather than an appropriate interface.
Fixes `TestCaseWithConstructor` inspection violations.
Description:
>Reports on JUnit test cases with initialization logic in their constructors. Initialization of JUnit test cases should be done in setUp() methods instead.
Fixes `UnnecessaryUnboxing` inspection violations.
Description:
>Reports "unboxing", e.g. explicit unwrapping of wrapped primitive values. Unboxing 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 `UnnecessaryBoxing` inspection violations.
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 `Element (a.dl-link) is overqualified, just use .dl-link without element name.`
Description:
>Using selector like the one bellow is almost every time unnecessary, unless the element name causes the class to behave differently you can omit it. With this you will shrink the file size and speedup your page load time.
Fixes `Rule is empty` inspection violations.
Description:
>An empty rule is one that doesn't contain any properties, such as:
```
.foo {
}
```
A lot of times, empty rules appear as a result of refactoring without further cleanup. Eliminating empty rules results in smaller file sizes and less style information for the browser to deal with.
Fixes `ParameterNameDiffersFromOverriddenParameter` inspection violation.
Description:
>Reports parameters that have different names from the corresponding parameters in the methods they override. While legal in Java, such inconsistent names may be confusing, and lessen the documentation benefits of good naming practices.
Fixes `ParameterNameDiffersFromOverriddenParameter` inspection violation.
Description:
>Reports parameters that have different names from the corresponding parameters in the methods they override. While legal in Java, such inconsistent names may be confusing, and lessen the documentation benefits of good naming practices.
Fixes `IfStatementWithIdenticalBranches` inspection violation.
Description:
>Reports if statements with identical "then" and else branches. Such statements are almost certainly programmer error.
Fixes `IfStatementWithTooManyBranches` inspection violation.
Description:
>Reports if statements with too many branches. Such statements may be confusing, and are often the sign of inadequate levels of design abstraction.
Fixes `TooBroadScope` inspection violation.
Description:
>Reports any variable declarations of which the scope can be narrowed. Especially useful for "Pascal style" declarations at the start of a method, but variables with too broad a scope are also often left over after refactorings.
Fixes `MethodMayBeStatic` inspection violation.
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 `WhileCanBeForeach` inspection violation.
Description:
>Reports while loops which iterate over collections, and can be replaced with the foreach iteration syntax, which is 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 `ReturnOfCollectionField` inspection violation.
Description:
>Reports any attempt to return an array or Collection field from a method. Since the array or Collection may have its contents modified by the calling method, this construct may result in an object having its state modified unexpectedly. While occasionally useful for performance reasons, this construct is inherently bug-prone.
Fixes `ReuseOfLocalVariable` inspection violation.
Description:
>Reports local variables that are "reused", overwriting their values with new values unrelated to their original use. Such local variable reuse may be confusing, as the intended semantics of the local variable may vary with each use. It may also be prone to bugs, if code changes result in values that were thought to be overwritten actually being live. It is good practices to keep variable lifetimes as short as possible, and not reuse local variables for the sake of brevity.
Fixes `UnusedAssignment` inspection violations.
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.
The issue was stream not being closed at all or closed, but not in finally block.
Fixes some `IOResource` inspection violations.
Description:
>Reports any I/O resource which is not safely closed in a finally block. Such resources may be inadvertently leaked if an exception is thrown before the resource is closed. I/O resources checked by this inspection include java.io.InputStream, java.io.OutputStream, java.io.Reader, java.io.Writer and java.io.RandomAccessFile. I/O resources which are wrapped by other I/O resources are not reported, as the wrapped resource will be closed by the wrapping resource.