ICMPv4Type and ICMPv4Code cannot be converted into TransportPort. Thus, the manual conversion code is inserted.
diff --git a/java_gen/templates/custom/OFMatchV1Ver10.Builder.java b/java_gen/templates/custom/OFMatchV1Ver10.Builder.java
index 396e3a0..c4cb6bc 100644
--- a/java_gen/templates/custom/OFMatchV1Ver10.Builder.java
+++ b/java_gen/templates/custom/OFMatchV1Ver10.Builder.java
@@ -319,11 +319,11 @@
wildcards &= ~OFPFW_DL_TYPE;
break;
case ICMPV4_CODE:
- setTcpDst((TransportPort) value);
+ setTcpDst(TransportPort.of(((ICMPv4Code)value).getCode()));
wildcards &= ~OFPFW_TP_DST;
break;
case ICMPV4_TYPE:
- setTcpSrc((TransportPort) value);
+ setTcpSrc(TransportPort.of(((ICMPv4Type)value).getType()));
wildcards &= ~OFPFW_TP_SRC;
break;
case IN_PORT: