*/
package org.opendaylight.controller.blueprint;
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
quiesceParticipantTracker.open();
}
- @SuppressFBWarnings(value = "UPM_UNCALLED_PRIVATE_METHOD",
- justification = "https://github.com/spotbugs/spotbugs/issues/811")
private QuiesceParticipant onQuiesceParticipantAdded(final ServiceReference<QuiesceParticipant> reference) {
quiesceParticipant = reference.getBundle().getBundleContext().getService(reference);
return quiesceParticipant;
}
- @SuppressFBWarnings(value = "UPM_UNCALLED_PRIVATE_METHOD",
- justification = "https://github.com/spotbugs/spotbugs/issues/811")
private BlueprintExtenderService onBlueprintExtenderServiceAdded(
final ServiceReference<BlueprintExtenderService> reference) {
blueprintExtenderService = reference.getBundle().getBundleContext().getService(reference);
return !paths.isEmpty() ? paths : findBlueprintPaths(bundle, ODL_CUSTOM_BLUEPRINT_FILE_PATH);
}
- @SuppressWarnings({ "rawtypes", "unchecked" })
private static List<Object> findBlueprintPaths(final Bundle bundle, final String path) {
Enumeration<?> rntries = bundle.findEntries(path, BLUEPRINT_FLE_PATTERN, false);
if (rntries == null) {
- return Collections.emptyList();
+ return List.of();
} else {
- return Collections.list((Enumeration)rntries);
+ return List.copyOf(Collections.list(rntries));
}
}