address comments
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/DatapathId.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/DatapathId.java
index 2e7a59b..708eaa9 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/DatapathId.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/DatapathId.java
@@ -6,7 +6,6 @@
import org.projectfloodlight.openflow.util.HexString;
import com.google.common.hash.PrimitiveSink;
-import com.google.common.primitives.Bytes;
import com.google.common.primitives.Longs;
import com.google.common.primitives.UnsignedLongs;
@@ -40,16 +39,12 @@
}
/**
- * Creates a {@link DatapathId} from a {@link MacAddress}. This factory
- * method assumes that the {@link DatapathId} is composed of two zero bytes
- * appended by the {@link MacAddress}'s 6 bytes.
+ * Creates a {@link DatapathId} from a {@link MacAddress}.
* @param mac the {@link MacAddress} to create the {@link DatapathId} from
* @return a {@link DatapathId} derived from the supplied {@link MacAddress}
*/
public static DatapathId of(@Nonnull MacAddress mac) {
- byte[] zeroBytes = new byte[]{0,0};
- byte[] fullBytes = Bytes.concat(zeroBytes, mac.getBytes());
- return DatapathId.of(fullBytes);
+ return DatapathId.of(mac.getLong());
}
public long getLong() {