X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fblueprint%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fblueprint%2Fext%2FSpecificReferenceListMetadata.java;h=a98a062993f43e6250f209b7320410dbf59d491b;hp=0412f00a7afb94132183271f6afdadeb640a4c7a;hb=e84f63ee098fff5b02cbce1281ca0d1208f966fa;hpb=9f147ebcda515aa8c4c0bf6cb53a05ef7a7e626d diff --git a/opendaylight/blueprint/src/main/java/org/opendaylight/controller/blueprint/ext/SpecificReferenceListMetadata.java b/opendaylight/blueprint/src/main/java/org/opendaylight/controller/blueprint/ext/SpecificReferenceListMetadata.java index 0412f00a7a..a98a062993 100644 --- a/opendaylight/blueprint/src/main/java/org/opendaylight/controller/blueprint/ext/SpecificReferenceListMetadata.java +++ b/opendaylight/blueprint/src/main/java/org/opendaylight/controller/blueprint/ext/SpecificReferenceListMetadata.java @@ -7,9 +7,7 @@ */ package org.opendaylight.controller.blueprint.ext; -import com.google.common.collect.ImmutableList; import com.google.common.io.Resources; -import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.io.IOException; import java.net.URL; import java.nio.charset.StandardCharsets; @@ -17,6 +15,7 @@ import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.HashSet; +import java.util.List; import java.util.Set; import java.util.concurrent.ConcurrentSkipListSet; import org.osgi.framework.Bundle; @@ -110,8 +109,6 @@ class SpecificReferenceListMetadata extends AbstractDependentComponentFactoryMet serviceTracker.open(); } - @SuppressFBWarnings(value = "UPM_UNCALLED_PRIVATE_METHOD", - justification = "https://github.com/spotbugs/spotbugs/issues/811") private void bundleAdded(final Bundle bundle) { URL resource = bundle.getEntry(serviceResourcePath); if (resource == null) { @@ -142,8 +139,6 @@ class SpecificReferenceListMetadata extends AbstractDependentComponentFactoryMet } } - @SuppressFBWarnings(value = "UPM_UNCALLED_PRIVATE_METHOD", - justification = "https://github.com/spotbugs/spotbugs/issues/811") private Object serviceAdded(final ServiceReference reference) { Object service = container().getBundleContext().getService(reference); String serviceType = (String) reference.getProperty(OpendaylightNamespaceHandler.TYPE_ATTR); @@ -196,7 +191,7 @@ class SpecificReferenceListMetadata extends AbstractDependentComponentFactoryMet LOG.debug("{}: create returning service list {}", logName(), retrievedServices); synchronized (retrievedServices) { - return ImmutableList.copyOf(retrievedServices); + return List.copyOf(retrievedServices); } } @@ -217,9 +212,9 @@ class SpecificReferenceListMetadata extends AbstractDependentComponentFactoryMet @Override public String toString() { - StringBuilder builder = new StringBuilder(); - builder.append("SpecificReferenceListMetadata [interfaceName=").append(interfaceName) - .append(", serviceResourcePath=").append(serviceResourcePath).append("]"); - return builder.toString(); + return new StringBuilder() + .append("SpecificReferenceListMetadata [interfaceName=").append(interfaceName) + .append(", serviceResourcePath=").append(serviceResourcePath).append("]") + .toString(); } }