Revert "Checkstyle enforcer"
[controller.git] / opendaylight / sal / api / src / main / java / org / opendaylight / controller / sal / action / Action.java
index 5e4f5f81fa15ef92d044324c667f97c7ddbffccd..d8144d7bb74eaaf7a043ce3cba623b58b53c041b 100644 (file)
@@ -15,8 +15,6 @@ import javax.xml.bind.annotation.XmlRootElement;
 import javax.xml.bind.annotation.XmlSeeAlso;
 import javax.xml.bind.annotation.XmlTransient;
 
-import org.apache.commons.lang3.builder.EqualsBuilder;
-import org.apache.commons.lang3.builder.HashCodeBuilder;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -122,12 +120,24 @@ public abstract class Action {
 
     @Override
     public int hashCode() {
-        return HashCodeBuilder.reflectionHashCode(this);
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ((type == null) ? 0 : type.hashCode());
+        return result;
     }
 
     @Override
     public boolean equals(Object obj) {
-        return EqualsBuilder.reflectionEquals(this, obj);
+        if (this == obj)
+            return true;
+        if (obj == null)
+            return false;
+        if (getClass() != obj.getClass())
+            return false;
+        Action other = (Action) obj;
+        if (type != other.type)
+            return false;
+        return true;
     }
 
     @Override