Sho SHIMIZU

Remove use of deprecated methods regarding TCP/UDP/SCTP ports

Change-Id: I165b3b765ca6b712684604399976f6987ce83291
...@@ -212,7 +212,7 @@ public final class DefaultTrafficSelector implements TrafficSelector { ...@@ -212,7 +212,7 @@ public final class DefaultTrafficSelector implements TrafficSelector {
212 @Deprecated 212 @Deprecated
213 @Override 213 @Override
214 public Builder matchTcpSrc(short tcpPort) { 214 public Builder matchTcpSrc(short tcpPort) {
215 - return add(Criteria.matchTcpSrc(tcpPort)); 215 + return matchTcpSrc(TpPort.tpPort(tcpPort));
216 } 216 }
217 217
218 @Override 218 @Override
...@@ -223,7 +223,7 @@ public final class DefaultTrafficSelector implements TrafficSelector { ...@@ -223,7 +223,7 @@ public final class DefaultTrafficSelector implements TrafficSelector {
223 @Deprecated 223 @Deprecated
224 @Override 224 @Override
225 public Builder matchTcpDst(short tcpPort) { 225 public Builder matchTcpDst(short tcpPort) {
226 - return add(Criteria.matchTcpDst(tcpPort)); 226 + return matchTcpDst(TpPort.tpPort(tcpPort));
227 } 227 }
228 228
229 @Override 229 @Override
...@@ -234,7 +234,7 @@ public final class DefaultTrafficSelector implements TrafficSelector { ...@@ -234,7 +234,7 @@ public final class DefaultTrafficSelector implements TrafficSelector {
234 @Deprecated 234 @Deprecated
235 @Override 235 @Override
236 public Builder matchUdpSrc(short udpPort) { 236 public Builder matchUdpSrc(short udpPort) {
237 - return add(Criteria.matchUdpSrc(udpPort)); 237 + return matchUdpSrc(TpPort.tpPort(udpPort));
238 } 238 }
239 239
240 @Override 240 @Override
...@@ -245,7 +245,7 @@ public final class DefaultTrafficSelector implements TrafficSelector { ...@@ -245,7 +245,7 @@ public final class DefaultTrafficSelector implements TrafficSelector {
245 @Deprecated 245 @Deprecated
246 @Override 246 @Override
247 public Builder matchUdpDst(short udpPort) { 247 public Builder matchUdpDst(short udpPort) {
248 - return add(Criteria.matchUdpDst(udpPort)); 248 + return matchUdpDst(TpPort.tpPort(udpPort));
249 } 249 }
250 250
251 @Override 251 @Override
...@@ -256,7 +256,7 @@ public final class DefaultTrafficSelector implements TrafficSelector { ...@@ -256,7 +256,7 @@ public final class DefaultTrafficSelector implements TrafficSelector {
256 @Deprecated 256 @Deprecated
257 @Override 257 @Override
258 public Builder matchSctpSrc(short sctpPort) { 258 public Builder matchSctpSrc(short sctpPort) {
259 - return add(Criteria.matchSctpSrc(sctpPort)); 259 + return matchSctpSrc(TpPort.tpPort(sctpPort));
260 } 260 }
261 261
262 @Override 262 @Override
...@@ -267,7 +267,7 @@ public final class DefaultTrafficSelector implements TrafficSelector { ...@@ -267,7 +267,7 @@ public final class DefaultTrafficSelector implements TrafficSelector {
267 @Deprecated 267 @Deprecated
268 @Override 268 @Override
269 public Builder matchSctpDst(short sctpPort) { 269 public Builder matchSctpDst(short sctpPort) {
270 - return add(Criteria.matchSctpDst(sctpPort)); 270 + return matchSctpDst(TpPort.tpPort(sctpPort));
271 } 271 }
272 272
273 @Override 273 @Override
......
...@@ -420,7 +420,7 @@ public final class DefaultTrafficTreatment implements TrafficTreatment { ...@@ -420,7 +420,7 @@ public final class DefaultTrafficTreatment implements TrafficTreatment {
420 @Deprecated 420 @Deprecated
421 @Override 421 @Override
422 public TrafficTreatment.Builder setTcpSrc(short port) { 422 public TrafficTreatment.Builder setTcpSrc(short port) {
423 - return add(Instructions.modTcpSrc(port)); 423 + return setTcpSrc(TpPort.tpPort(port));
424 } 424 }
425 425
426 @Override 426 @Override
...@@ -431,7 +431,7 @@ public final class DefaultTrafficTreatment implements TrafficTreatment { ...@@ -431,7 +431,7 @@ public final class DefaultTrafficTreatment implements TrafficTreatment {
431 @Deprecated 431 @Deprecated
432 @Override 432 @Override
433 public TrafficTreatment.Builder setTcpDst(short port) { 433 public TrafficTreatment.Builder setTcpDst(short port) {
434 - return add(Instructions.modTcpDst(port)); 434 + return setTcpDst(TpPort.tpPort(port));
435 } 435 }
436 436
437 @Override 437 @Override
...@@ -442,7 +442,7 @@ public final class DefaultTrafficTreatment implements TrafficTreatment { ...@@ -442,7 +442,7 @@ public final class DefaultTrafficTreatment implements TrafficTreatment {
442 @Deprecated 442 @Deprecated
443 @Override 443 @Override
444 public TrafficTreatment.Builder setUdpSrc(short port) { 444 public TrafficTreatment.Builder setUdpSrc(short port) {
445 - return add(Instructions.modUdpSrc(port)); 445 + return setUdpSrc(TpPort.tpPort(port));
446 } 446 }
447 447
448 @Override 448 @Override
...@@ -453,7 +453,7 @@ public final class DefaultTrafficTreatment implements TrafficTreatment { ...@@ -453,7 +453,7 @@ public final class DefaultTrafficTreatment implements TrafficTreatment {
453 @Deprecated 453 @Deprecated
454 @Override 454 @Override
455 public TrafficTreatment.Builder setUdpDst(short port) { 455 public TrafficTreatment.Builder setUdpDst(short port) {
456 - return add(Instructions.modUdpDst(port)); 456 + return setUdpDst(TpPort.tpPort(port));
457 } 457 }
458 458
459 @Override 459 @Override
......