resources.report.rules.pmd.Migration_Rules.html Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sanity4j Show documentation
Show all versions of sanity4j Show documentation
Sanity4J was created to simplify running multiple static code
analysis tools on the Java projects. It provides a single entry
point to run all the selected tools and produce a consolidated
report, which presents all findings in an easily accessible
manner.
Migration_Rules
Migration_Rules
ration_Rules">Migration Rules
ReplaceVectorWithList:
Consider replacing Vector usages with the newer java.util.ArrayList if expensive threadsafe operation is not required.
ReplaceHashtableWithMap:
Consider replacing this Hashtable with the newer java.util.Map
ReplaceEnumerationWithIterator:
Consider replacing this Enumeration with the newer java.util.Iterator
AvoidEnumAsIdentifier: Finds all places where 'enum' is used as an identifier.
AvoidAssertAsIdentifier: Finds all places where 'assert' is used as an identifier.
IntegerInstantiation: In JDK 1.5, calling new Integer() causes memory allocation. Integer.valueOf() is more memory friendly.
ByteInstantiation:
In JDK 1.5, calling new Byte() causes memory allocation. Byte.valueOf() is more memory friendly.
ShortInstantiation: In JDK 1.5, calling new Short() causes memory allocation. Short.valueOf() is more memory friendly.
LongInstantiation: In JDK 1.5, calling new Long() causes memory allocation. Long.valueOf() is more memory friendly.
JUnit4TestShouldUseBeforeAnnotation:
In JUnit 3, the setUp method was used to set up all data entities required in running tests. JUnit 4 skips the setUp method
and executes all methods annotated with @Before before all tests
JUnit4TestShouldUseAfterAnnotation:
In JUnit 3, the tearDown method was used to clean up all data entities required in running tests. JUnit 4 skips the tearDown method
and executes all methods annotated with @After after running each test
JUnit4TestShouldUseTestAnnotation:
In JUnit 3, the framework executed all methods which started with the word test as a unit test. In JUnit 4, only methods annotated
with the @Test annotation are executed.
JUnit4SuitesShouldUseSuiteAnnotation:
In JUnit 3, test suites are indicated by the suite() method. In JUnit 4, suites are indicated
through the @RunWith(Suite.class) annotation.
JUnitUseExpected:
© 2015 - 2024 Weber Informatics LLC | Privacy Policy