src/main/java/pl/pojo/tester/api/ConstructorParameters.java
Avoid variables with short names like o
public boolean equals(final Object o) {
Returning 'parameters' may expose an internal array.
return parameters;
src/main/java/pl/pojo/tester/api/FieldPredicate.java
Found 'UR'-anomaly for variable 'filedName' (lines '40'-'43').
public static Predicate<String> include(final List<String> includedFields) {
src/main/java/pl/pojo/tester/api/NamedPredicate.java
Found 'DD'-anomaly for variable 'otherName' (lines '43'-'45').
String otherName = "";
src/main/java/pl/pojo/tester/api/assertion/AbstractAssertion.java
This class has too many methods, consider refactoring it.
public abstract class AbstractAssertion {
src/main/java/pl/pojo/tester/internal/field/collections/collection/SortedSetValueChanger.java
Avoid using implementation types like 'TreeSet'; use the interface instead
private TreeSet<Object> createTreeSet() {
src/main/java/pl/pojo/tester/internal/field/collections/collection/TreeSetValueChanger.java
Avoid using implementation types like 'TreeSet'; use the interface instead
private TreeSet<Object> createTreeSet() {
Avoid variables with short names like o
objects.add((Comparable<Object>) o -> 0);
src/main/java/pl/pojo/tester/internal/field/collections/iterators/IteratorValueChanger.java
Use equals() to compare object references.
if (sourceValue == targetValue) {
src/main/java/pl/pojo/tester/internal/instantiator/CollectionInstantiator.java
Avoid using implementation types like 'ArrayList'; use the interface instead
PREPARED_OBJECTS.put(ArrayList.class, new ArrayList<>());
Avoid using implementation types like 'TreeMap'; use the interface instead
PREPARED_OBJECTS.put(TreeMap.class, new TreeMap<>());
src/main/java/pl/pojo/tester/internal/instantiator/Instantiable.java
Use explicit scoping instead of the default package private level
static Object[] instantiateClasses(final Class<?>[] classes,
src/main/java/pl/pojo/tester/internal/instantiator/ObjectGenerator.java
Avoid instantiating new objects inside loops
final Map<Field, List<Object>> nestedObjectsThatAreWaitingForSetInBaseObjectCopy = new HashMap<>();
Found 'DU'-anomaly for variable 'objectsToFillWith' (lines '188'-'201').
final List<Object> objectsToFillWith = nestedObjectsToSet.getValue();
src/main/java/pl/pojo/tester/internal/instantiator/UserDefinedConstructorInstantiator.java
Found 'DD'-anomaly for variable 'arguments' (lines '45'-'51').
Object[] arguments = constructorParameters.getParameters();
src/main/java/pl/pojo/tester/internal/tester/AbstractTester.java
Use explicit scoping instead of the default package private level
final TestAssertions testAssertions = new TestAssertions();
src/main/java/pl/pojo/tester/internal/utils/CollectionUtils.java
Avoid using implementation types like 'ArrayList'; use the interface instead
public static <T> ArrayList<T> asList(final T... elements) {
src/main/java/pl/pojo/tester/internal/utils/MethodUtils.java
Useless parentheses.
return (methodName.startsWith("is") && methodName.equals(fieldName))
Useless parentheses.
&& ((methodName.startsWith("is") && (methodName.length() == (fieldNameLength + 2)))
Found 'DU'-anomaly for variable 'fieldNameLength' (lines '78'-'91').
final int fieldNameLength = fieldName.length();
More
Previous Next