Replace the method call of Apache Commons Collections with Guava's
Old Apache Commons Collections doesn't support generics Change-Id: I29862c3a22a4cf96c92b90bb189e05740f070ff8
Showing
1 changed file
with
4 additions
and
2 deletions
... | @@ -18,7 +18,6 @@ package org.onosproject.net.flow; | ... | @@ -18,7 +18,6 @@ package org.onosproject.net.flow; |
18 | import com.google.common.base.MoreObjects; | 18 | import com.google.common.base.MoreObjects; |
19 | import com.google.common.collect.ImmutableList; | 19 | import com.google.common.collect.ImmutableList; |
20 | import com.google.common.collect.Lists; | 20 | import com.google.common.collect.Lists; |
21 | -import org.apache.commons.collections.ListUtils; | ||
22 | import org.onlab.packet.EthType; | 21 | import org.onlab.packet.EthType; |
23 | import org.onlab.packet.IpAddress; | 22 | import org.onlab.packet.IpAddress; |
24 | import org.onlab.packet.MacAddress; | 23 | import org.onlab.packet.MacAddress; |
... | @@ -81,7 +80,10 @@ public final class DefaultTrafficTreatment implements TrafficTreatment { | ... | @@ -81,7 +80,10 @@ public final class DefaultTrafficTreatment implements TrafficTreatment { |
81 | Instructions.MetadataInstruction meta) { | 80 | Instructions.MetadataInstruction meta) { |
82 | this.immediate = ImmutableList.copyOf(checkNotNull(immediate)); | 81 | this.immediate = ImmutableList.copyOf(checkNotNull(immediate)); |
83 | this.deferred = ImmutableList.copyOf(checkNotNull(deferred)); | 82 | this.deferred = ImmutableList.copyOf(checkNotNull(deferred)); |
84 | - this.all = ListUtils.union(this.immediate, this.deferred); | 83 | + this.all = new ImmutableList.Builder<Instruction>() |
84 | + .addAll(immediate) | ||
85 | + .addAll(deferred) | ||
86 | + .build(); | ||
85 | this.table = table; | 87 | this.table = table; |
86 | this.meta = meta; | 88 | this.meta = meta; |
87 | this.hasClear = clear; | 89 | this.hasClear = clear; | ... | ... |
-
Please register or login to post a comment