Sho SHIMIZU
Committed by Gerrit Code Review

Use diamond operator to remove compiler warning

Change-Id: I04c4d49ccf43b10a0443bdd9b3e4a1014c492d5d
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
15 */ 15 */
16 package org.onosproject.net.intent.impl.compiler; 16 package org.onosproject.net.intent.impl.compiler;
17 17
18 +import com.google.common.collect.Sets;
18 import org.apache.commons.lang3.tuple.Pair; 19 import org.apache.commons.lang3.tuple.Pair;
19 import org.apache.felix.scr.annotations.Activate; 20 import org.apache.felix.scr.annotations.Activate;
20 import org.apache.felix.scr.annotations.Component; 21 import org.apache.felix.scr.annotations.Component;
...@@ -55,10 +56,8 @@ import org.osgi.service.component.ComponentContext; ...@@ -55,10 +56,8 @@ import org.osgi.service.component.ComponentContext;
55 import org.slf4j.Logger; 56 import org.slf4j.Logger;
56 import org.slf4j.LoggerFactory; 57 import org.slf4j.LoggerFactory;
57 58
58 -import java.util.Arrays;
59 import java.util.Collections; 59 import java.util.Collections;
60 import java.util.Dictionary; 60 import java.util.Dictionary;
61 -import java.util.HashSet;
62 import java.util.LinkedList; 61 import java.util.LinkedList;
63 import java.util.List; 62 import java.util.List;
64 import java.util.Set; 63 import java.util.Set;
...@@ -154,7 +153,7 @@ public class OpticalCircuitIntentCompiler implements IntentCompiler<OpticalCircu ...@@ -154,7 +153,7 @@ public class OpticalCircuitIntentCompiler implements IntentCompiler<OpticalCircu
154 log.debug("Compiling optical circuit intent between {} and {}", src, dst); 153 log.debug("Compiling optical circuit intent between {} and {}", src, dst);
155 154
156 // Reserve OduClt ports 155 // Reserve OduClt ports
157 - if (!deviceResourceService.requestPorts(new HashSet(Arrays.asList(srcPort, dstPort)), intent)) { 156 + if (!deviceResourceService.requestPorts(Sets.newHashSet(srcPort, dstPort), intent)) {
158 throw new IntentCompilationException("Unable to reserve ports for intent " + intent); 157 throw new IntentCompilationException("Unable to reserve ports for intent " + intent);
159 } 158 }
160 159
......