Code Review
/
controller.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
ICMP fix and Packet class should store and provide access to the raw payload in case...
[controller.git]
/
opendaylight
/
sal
/
api
/
src
/
main
/
java
/
org
/
opendaylight
/
controller
/
sal
/
packet
/
Ethernet.java
diff --git
a/opendaylight/sal/api/src/main/java/org/opendaylight/controller/sal/packet/Ethernet.java
b/opendaylight/sal/api/src/main/java/org/opendaylight/controller/sal/packet/Ethernet.java
index 0d866d644eae967780eeb8cd5bb7fd6847e2f27c..c96e90156178803f7d835f5369a6892054cbcc39 100644
(file)
--- a/
opendaylight/sal/api/src/main/java/org/opendaylight/controller/sal/packet/Ethernet.java
+++ b/
opendaylight/sal/api/src/main/java/org/opendaylight/controller/sal/packet/Ethernet.java
@@
-13,16
+13,12
@@
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.LinkedHashMap;
import java.util.Map;
-import org.apache.commons.lang3.builder.EqualsBuilder;
-import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.commons.lang3.tuple.ImmutablePair;
import org.apache.commons.lang3.tuple.Pair;
import org.opendaylight.controller.sal.utils.EtherTypes;
/**
* Class that represents the Ethernet frame objects
import org.apache.commons.lang3.tuple.ImmutablePair;
import org.apache.commons.lang3.tuple.Pair;
import org.opendaylight.controller.sal.utils.EtherTypes;
/**
* Class that represents the Ethernet frame objects
- *
- *
*/
public class Ethernet extends Packet {
private static final String DMAC = "DestinationMACAddress";
*/
public class Ethernet extends Packet {
private static final String DMAC = "DestinationMACAddress";
@@
-31,7
+27,7
@@
public class Ethernet extends Packet {
// TODO: This has to be outside and it should be possible for osgi
// to add new coming packet classes
// TODO: This has to be outside and it should be possible for osgi
// to add new coming packet classes
- public static Map<Short, Class<? extends Packet>> etherTypeClassMap;
+ public static
final
Map<Short, Class<? extends Packet>> etherTypeClassMap;
static {
etherTypeClassMap = new HashMap<Short, Class<? extends Packet>>();
etherTypeClassMap.put(EtherTypes.ARP.shortValue(), ARP.class);
static {
etherTypeClassMap = new HashMap<Short, Class<? extends Packet>>();
etherTypeClassMap.put(EtherTypes.ARP.shortValue(), ARP.class);
@@
-46,7
+42,7
@@
public class Ethernet extends Packet {
put(ETHT, new ImmutablePair<Integer, Integer>(96, 16));
}
};
put(ETHT, new ImmutablePair<Integer, Integer>(96, 16));
}
};
- private Map<String, byte[]> fieldValues;
+ private
final
Map<String, byte[]> fieldValues;
/**
* Default constructor that creates and sets the HashMap
/**
* Default constructor that creates and sets the HashMap
@@
-130,14
+126,4
@@
public class Ethernet extends Packet {
return this;
}
return this;
}
- @Override
- public int hashCode() {
- return HashCodeBuilder.reflectionHashCode(this);
- }
-
- @Override
- public boolean equals(Object obj) {
- return EqualsBuilder.reflectionEquals(this, obj);
- }
-
}
}