OFPort: remove wrong NONE=0 constant
diff --git a/java_gen/java_type.py b/java_gen/java_type.py
index 87ce9d6..53c37cf 100644
--- a/java_gen/java_type.py
+++ b/java_gen/java_type.py
@@ -248,8 +248,8 @@
 u64 = JType('U64', 'U64') \
         .op(read='U64.ofRaw(bb.readLong())', write='bb.writeLong($name.getValue())', default="U64.ZERO")
 of_port = JType("OFPort") \
-         .op(version=1, read="OFPort.read2Bytes(bb)", write="$name.write2Bytes(bb)", default="OFPort.NONE") \
-         .op(version=ANY, read="OFPort.read4Bytes(bb)", write="$name.write4Bytes(bb)", default="OFPort.NONE")
+         .op(version=1, read="OFPort.read2Bytes(bb)", write="$name.write2Bytes(bb)", default="OFPort.ANY") \
+         .op(version=ANY, read="OFPort.read4Bytes(bb)", write="$name.write4Bytes(bb)", default="OFPort.ANY")
 actions_list = JType('List<OFAction>') \
         .op(read='ChannelUtils.readList(bb, $length, OFActionVer$version.READER)',
             write='ChannelUtils.writeList(bb, $name);',
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFPort.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFPort.java
index db7bd5f..858eda6 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFPort.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFPort.java
@@ -20,7 +20,6 @@
 
     // private int constants (OF1.1+) to avoid duplication in the code
     // should not have to use these outside this class
-    private static final int OFPP_NONE_INT = 0x0;
     private static final int OFPP_ANY_INT = 0xFFffFFff;
     private static final int OFPP_LOCAL_INT = 0xFFffFFfe;
     private static final int OFPP_CONTROLLER_INT = 0xFFffFFfd;
@@ -87,9 +86,6 @@
      */
     public final static OFPort ANY = new NamedPort(OFPP_ANY_INT, "any");
 
-    /** port number 0, read of the wire, e.g, if not set */
-    public final static OFPort NONE = new NamedPort(OFPP_NONE_INT, "none");
-
     public static final OFPort NO_MASK = OFPort.of(0xFFFFFFFF);
     public static final OFPort FULL_MASK = OFPort.of(0x0);
 
@@ -162,8 +158,6 @@
      */
     public static OFPort ofInt(final int portNumber) {
         switch (portNumber) {
-            case 0:
-                return NONE;
             case 1:
                 return PrecachedPort.p1;
             case 2:
@@ -306,8 +300,6 @@
      */
     public static OFPort ofShort(final short portNumber) {
         switch (portNumber) {
-            case 0:
-                return NONE;
             case 1:
                 return PrecachedPort.p1;
             case 2:
diff --git a/java_gen/templates/custom/OFMatchV1Ver10.Builder.java b/java_gen/templates/custom/OFMatchV1Ver10.Builder.java
index 769a687..38cc127 100644
--- a/java_gen/templates/custom/OFMatchV1Ver10.Builder.java
+++ b/java_gen/templates/custom/OFMatchV1Ver10.Builder.java
@@ -425,7 +425,7 @@
                     wildcards |= OFPFW_TP_SRC;
                     break;
                 case IN_PORT:
-                    setInPort(OFPort.NONE);
+                    setInPort(OFPort.of(0)); // NOTE: not 'NONE' -- that is 0xFF for ports
                     wildcards |= OFPFW_IN_PORT;
                     break;
                 case IPV4_DST: