Commit Graph

4443 Commits

Author SHA1 Message Date
Michal Kordas eeb20e6c8c Correct name of exception. #1555
Fixes `ExceptionNameDoesntEndWithException` inspection violation in test code.

Description:
>Reports exception classes whose names don't end with 'Exception'.
2015-08-16 23:08:23 +02:00
Roman Ivanov 5630e4399b Issue #1243: Added serialId to test classes 2015-08-16 14:47:17 +03:00
Roman Ivanov 80e0a90fb8 Issue #1243: Eclipse warnings are fixed 2015-08-16 08:23:07 +03:00
Roman Ivanov 617b099c97 fix for Eclipse compiler error 2015-08-16 07:54:15 +03:00
Aleksandr Ivanov cd12de2a24 Extended messages for CustomImportOrder #1648 2015-08-16 07:15:10 +03:00
Michal Kordas accb0bf5bc Update Maven FindBugs Plugin to 3.0.2. #1714 2015-08-16 07:03:57 +03:00
Michal Kordas 26774cf310 Remove calls to simple setters from within classes. #1555
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.
2015-08-16 07:03:15 +03:00
Michal Kordas 1ab08ad4ab Make methods static. #1555
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.
2015-08-16 07:02:36 +03:00
Michal Kordas c0a69490d7 Remove string concatenation in format string argument. #1555
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.
2015-08-16 07:01:24 +03:00
Michal Kordas 931af7ec14 Simplify expressions that are constant. #1555
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.
2015-08-16 07:00:45 +03:00
Michal Kordas e936c4c6fa Remove unnecessary synchronization. #1555
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.
2015-08-16 06:55:04 +03:00
Ruslan Diachenko b02d9661f8 Issue #1566: VisibilityModifier violations fixed 2015-08-16 06:52:54 +03:00
Baratali Izmailov 65dd1fac70 Issue #1243: Suppressed LeftCurlyCheck's deprecated field 2015-08-16 06:51:53 +03:00
Baratali Izmailov c4cc403882 Issue #1243: Useless local variable has been removed 2015-08-16 06:51:16 +03:00
Ruslan Diachenko 544e9992af Issue #1566: LineLength violations fixed 2015-08-16 06:50:00 +03:00
Baratali Izmailov 259cc41625 Issue #1243: Output stream has to be closed 2015-08-16 06:23:19 +03:00
Ruslan Diachenko 245ca68d99 Issue #1566: HideUtilityClassConstructor violations fixed 2015-08-16 06:20:41 +03:00
Baratali Izmailov cc1b2e99c3 Issue #1243: Unsafe casts have been suppressed in UTs which use reflection 2015-08-16 06:18:12 +03:00
Baratali Izmailov 6ec212bb5e Issue #1243: Input file to resources folder 2015-08-15 15:53:21 -04:00
Roman Ivanov a15aacf77a fix for build failure 2015-08-15 14:47:45 +03:00
Michal Kordas 6370bd4a8a Do not allocate arrays of zero length. #1555
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.
2015-08-15 06:46:26 +03:00
Michal Kordas e72b617d4b Replace <code> tags with {@code ...} constructs. #1555
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.
2015-08-15 06:45:50 +03:00
Michal Kordas 020d8b2469 Fix exception creation without any arguments specified. #1555
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.
2015-08-15 06:45:13 +03:00
Michal Kordas 7453d382c1 Decrease visibility of package-local class. #1555
Fixes `PackageVisibleInnerClass` inspection violation.

Description:
>Reports package-local inner classes.
2015-08-15 06:44:32 +03:00
Michal Kordas fe251ed9ff Add missing case in switch. #1555
Fixes `EnumSwitchStatementWhichMissesCases` inspection violation.

Description:
>Reports switch statements over enumerated types which do not include all of the enumerated type's elements as cases.
2015-08-15 06:43:24 +03:00
Michal Kordas 027d1e2c99 Invert conditional expressions that are negated. #1555
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.
2015-08-15 06:42:50 +03:00
Michal Kordas 02dfe8c7c5 Remove unnecessary this. #1555
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.
2015-08-15 06:42:09 +03:00
Michal Kordas 257983bcbf Mark fields as final. #1555
Fixes `FieldMayBeFinal` inspection violations.

Description:
>Reports any fields which may safely be made final. A static field may be final if it is initialized in its declaration or in one static class initializer, but not both. A non-static field may be final if it is initialized in its declaration or in one non-static class initializer or in all constructors.
2015-08-15 06:41:30 +03:00
Ilja Dubinin 901d777e3d Coverage has been increased to 100% in CheckUtils. Issue #1290 2015-08-15 01:28:16 +01:00
Baratali Izmailov 88fcce5774 Issue #1243: Suppress warnings for UTs testing deprecated code 2015-08-14 21:44:40 +03:00
Baratali Izmailov f23a34503b Issue #1243: Useless Class variables 2015-08-14 21:39:12 +03:00
Andrei Selkin 9d74879c35 Fixed typo in JavadocMethod's examples xdocs, issue #1668 2015-08-14 21:37:13 +03:00
Baratali Izmailov cdef243543 Issue #1243: 'A generic array is created for varargs parameter' suppressed 2015-08-14 20:59:52 +03:00
Baratali Izmailov a0f2bac065 Issue #1243: Input files to resources folder 2015-08-14 20:58:20 +03:00
Baratali Izmailov 03a15583ca Issue #1243: Suppress test class with unused fields 2015-08-14 20:50:28 +03:00
Baratali Izmailov c6b421f17d Issue #1243: Input files to resources folder. 2015-08-14 20:47:41 +03:00
Ruslan Diachenko 66d73fe618 Issue #1566: MemberName and MethodName violations fixed 2015-08-14 17:00:11 +03:00
Baratali Izmailov 443e534a3c Issue #1243: Resolved varargs ambiguity 2015-08-14 16:58:43 +03:00
Ruslan Diachenko d3408eb4e4 Issue #1566: InnerTypeLast turned on 2015-08-14 16:57:33 +03:00
Ruslan Diachenko 242028813d Issue #1566: ModifiedControlVariable violations fixed 2015-08-14 16:56:18 +03:00
Andrei Selkin d808a4e4d9 Added problematic links to ignorelist of linkcheck, issue #751 2015-08-14 11:39:48 +03:00
Andrei Selkin 2e1c0147df Corrected links on web site (addition), issue #751 2015-08-14 11:39:48 +03:00
Baratali Izmailov bb5eb6c08e Issue #1243: 'Local variable is not used' fixed 2015-08-13 11:34:20 -04:00
Ilja Dubinin 7770f2a2c2 Loops have to have only one breal/continue. Issue #46 2015-08-13 07:08:02 +03:00
Michal Kordas 6a0bad784f Remove unnecessary this. #1555
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.
2015-08-13 07:03:37 +03:00
Michal Kordas e9ade4ddad Remove redundant unit in zero value form CSS. #1555
Fixes `CssRedundantUnit` inspection violations.

Description:
>This inspection highlights zero values with specified unit of measurement.
2015-08-13 06:55:07 +03:00
Michal Kordas 7b34e9d7cd Do not allocate arrays of zero length. #1555
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.
2015-08-13 06:53:26 +03:00
Ruslan Diachenko 29f945e338 Issue #1566: Constructor definition in wrong order violations fixed 2015-08-13 06:51:11 +03:00
Ruslan Diachenko 677a74deee Issue #1566: ImportOrder violations fixed 2015-08-13 06:48:16 +03:00
Michal Kordas 26ffb0af87 Change name of private method conflicting with superclass method. #1555
Fixes `MethodOverridesPrivateMethod` inspection violations.

Description:
>Reports instance methods having the same name as a private method of a superclass. Such methods may result in confusing semantics, particularly if the private method is ever made publicly visible.
2015-08-13 06:45:38 +03:00