fujaba/NetworkParser

View on GitHub
src/main/java/de/uniks/networkparser/list/AbstractList.java

Summary

Maintainability
A
2 hrs
Test Coverage

AbstractList has 22 methods (exceeds 20 allowed). Consider refactoring.
Open

public abstract class AbstractList<V> extends AbstractArray<V> implements Iterable<V>, Cloneable {
  private Class<?> type;

  @SuppressWarnings("unchecked")
  public <ST extends AbstractList<V>> ST withType(Class<?> type) {
Severity: Minor
Found in src/main/java/de/uniks/networkparser/list/AbstractList.java - About 2 hrs to fix

    Ensure you override both equals() and hashCode()
    Open

      public boolean equals(Object obj) {

    OverrideBothEqualsAndHashcode

    Since: PMD 0.4

    Priority: Medium

    Categories: Style

    Remediation Points: 50000

    Override both public boolean Object.equals(Object other), and public int Object.hashCode(), or override neither. Even if you are inheriting a hashCode() from a parent class, consider implementing hashCode and explicitly delegating to your superclass.

    Example:

    public class Bar { // poor, missing a hashcode() method
     public boolean equals(Object o) {
     // do some comparison
     }
    }
    
    public class Baz { // poor, missing an equals() method
     public int hashCode() {
     // return some hash value
     }
    }
    
    public class Foo { // perfect, both methods provided
     public boolean equals(Object other) {
     // do some comparison
     }
     public int hashCode() {
     // return some hash value
     }
    }

    There are no issues that match your filters.

    Category
    Status