Remove use of deprecated methods regarding TCP/UDP/SCTP ports
Change-Id: I165b3b765ca6b712684604399976f6987ce83291
diff --git a/core/api/src/main/java/org/onosproject/net/flow/DefaultTrafficSelector.java b/core/api/src/main/java/org/onosproject/net/flow/DefaultTrafficSelector.java
index c97b66a..f88c6bc 100644
--- a/core/api/src/main/java/org/onosproject/net/flow/DefaultTrafficSelector.java
+++ b/core/api/src/main/java/org/onosproject/net/flow/DefaultTrafficSelector.java
@@ -212,7 +212,7 @@
@Deprecated
@Override
public Builder matchTcpSrc(short tcpPort) {
- return add(Criteria.matchTcpSrc(tcpPort));
+ return matchTcpSrc(TpPort.tpPort(tcpPort));
}
@Override
@@ -223,7 +223,7 @@
@Deprecated
@Override
public Builder matchTcpDst(short tcpPort) {
- return add(Criteria.matchTcpDst(tcpPort));
+ return matchTcpDst(TpPort.tpPort(tcpPort));
}
@Override
@@ -234,7 +234,7 @@
@Deprecated
@Override
public Builder matchUdpSrc(short udpPort) {
- return add(Criteria.matchUdpSrc(udpPort));
+ return matchUdpSrc(TpPort.tpPort(udpPort));
}
@Override
@@ -245,7 +245,7 @@
@Deprecated
@Override
public Builder matchUdpDst(short udpPort) {
- return add(Criteria.matchUdpDst(udpPort));
+ return matchUdpDst(TpPort.tpPort(udpPort));
}
@Override
@@ -256,7 +256,7 @@
@Deprecated
@Override
public Builder matchSctpSrc(short sctpPort) {
- return add(Criteria.matchSctpSrc(sctpPort));
+ return matchSctpSrc(TpPort.tpPort(sctpPort));
}
@Override
@@ -267,7 +267,7 @@
@Deprecated
@Override
public Builder matchSctpDst(short sctpPort) {
- return add(Criteria.matchSctpDst(sctpPort));
+ return matchSctpDst(TpPort.tpPort(sctpPort));
}
@Override
diff --git a/core/api/src/main/java/org/onosproject/net/flow/DefaultTrafficTreatment.java b/core/api/src/main/java/org/onosproject/net/flow/DefaultTrafficTreatment.java
index 8d787c4..5d18a9a 100644
--- a/core/api/src/main/java/org/onosproject/net/flow/DefaultTrafficTreatment.java
+++ b/core/api/src/main/java/org/onosproject/net/flow/DefaultTrafficTreatment.java
@@ -420,7 +420,7 @@
@Deprecated
@Override
public TrafficTreatment.Builder setTcpSrc(short port) {
- return add(Instructions.modTcpSrc(port));
+ return setTcpSrc(TpPort.tpPort(port));
}
@Override
@@ -431,7 +431,7 @@
@Deprecated
@Override
public TrafficTreatment.Builder setTcpDst(short port) {
- return add(Instructions.modTcpDst(port));
+ return setTcpDst(TpPort.tpPort(port));
}
@Override
@@ -442,7 +442,7 @@
@Deprecated
@Override
public TrafficTreatment.Builder setUdpSrc(short port) {
- return add(Instructions.modUdpSrc(port));
+ return setUdpSrc(TpPort.tpPort(port));
}
@Override
@@ -453,7 +453,7 @@
@Deprecated
@Override
public TrafficTreatment.Builder setUdpDst(short port) {
- return add(Instructions.modUdpDst(port));
+ return setUdpDst(TpPort.tpPort(port));
}
@Override