X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fprotocol_plugins%2Fopenflow%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fprotocol_plugin%2Fopenflow%2Fvendorextension%2Fv6extension%2FV6Error.java;h=c52c3f56b800a57ff247bc4a7246db2b3065c49d;hb=refs%2Fchanges%2F49%2F449%2F1;hp=4f0dbd5ca55b0b621f6202a68e7488cdc4447486;hpb=95abc843094ef5fa8bc87c1d5933bfad9702b0a0;p=controller.git diff --git a/opendaylight/protocol_plugins/openflow/src/main/java/org/opendaylight/controller/protocol_plugin/openflow/vendorextension/v6extension/V6Error.java b/opendaylight/protocol_plugins/openflow/src/main/java/org/opendaylight/controller/protocol_plugin/openflow/vendorextension/v6extension/V6Error.java index 4f0dbd5ca5..c52c3f56b8 100644 --- a/opendaylight/protocol_plugins/openflow/src/main/java/org/opendaylight/controller/protocol_plugin/openflow/vendorextension/v6extension/V6Error.java +++ b/opendaylight/protocol_plugins/openflow/src/main/java/org/opendaylight/controller/protocol_plugin/openflow/vendorextension/v6extension/V6Error.java @@ -1,10 +1,8 @@ package org.opendaylight.controller.protocol_plugin.openflow.vendorextension.v6extension; import java.nio.ByteBuffer; +import java.util.Arrays; -import org.apache.commons.lang3.builder.EqualsBuilder; -import org.apache.commons.lang3.builder.HashCodeBuilder; -import org.apache.commons.lang3.builder.ReflectionToStringBuilder; import org.openflow.protocol.OFError; public class V6Error extends OFError { @@ -65,16 +63,44 @@ public class V6Error extends OFError { @Override public int hashCode() { - return HashCodeBuilder.reflectionHashCode(this); + final int prime = 31; + int result = super.hashCode(); + result = prime * result + Arrays.hashCode(V6ErrorData); + result = prime * result + V6VendorErrorCode; + result = prime * result + V6VendorErrorType; + result = prime * result + V6VendorId; + return result; } @Override public String toString() { - return "V6Error[" + ReflectionToStringBuilder.toString(this) + "]"; + return "V6Error [V6VendorId=" + V6VendorId + ", V6VendorErrorType=" + + V6VendorErrorType + ", V6VendorErrorCode=" + + V6VendorErrorCode + ", V6ErrorData=" + + Arrays.toString(V6ErrorData) + ", errorType=" + errorType + + ", errorCode=" + errorCode + ", factory=" + factory + + ", error=" + Arrays.toString(error) + ", errorIsAscii=" + + errorIsAscii + ", version=" + version + ", type=" + type + + ", length=" + length + ", xid=" + xid + "]"; } @Override public boolean equals(Object obj) { - return EqualsBuilder.reflectionEquals(this, obj); + if (this == obj) + return true; + if (!super.equals(obj)) + return false; + if (getClass() != obj.getClass()) + return false; + V6Error other = (V6Error) obj; + if (!Arrays.equals(V6ErrorData, other.V6ErrorData)) + return false; + if (V6VendorErrorCode != other.V6VendorErrorCode) + return false; + if (V6VendorErrorType != other.V6VendorErrorType) + return false; + if (V6VendorId != other.V6VendorId) + return false; + return true; } }