X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=opendaylight%2Fadsal%2Fnorthbound%2Fbundlescanner%2Fimplementation%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fnorthbound%2Fbundlescanner%2Finternal%2FBundleScanner.java;h=f6b604d8b68ee304a85a40c524839a01a545a670;hb=159881b2b1c44301f740a6d20199df58eea04851;hp=2fee2720c2197d5af35ec0c839ad44f5df631942;hpb=2e15a7b29e4517e7b1b1ded0acb5a0ccf03d77e0;p=controller.git diff --git a/opendaylight/adsal/northbound/bundlescanner/implementation/src/main/java/org/opendaylight/controller/northbound/bundlescanner/internal/BundleScanner.java b/opendaylight/adsal/northbound/bundlescanner/implementation/src/main/java/org/opendaylight/controller/northbound/bundlescanner/internal/BundleScanner.java index 2fee2720c2..f6b604d8b6 100644 --- a/opendaylight/adsal/northbound/bundlescanner/implementation/src/main/java/org/opendaylight/controller/northbound/bundlescanner/internal/BundleScanner.java +++ b/opendaylight/adsal/northbound/bundlescanner/implementation/src/main/java/org/opendaylight/controller/northbound/bundlescanner/internal/BundleScanner.java @@ -72,7 +72,9 @@ import org.slf4j.LoggerFactory; boolean includeDependentBundleClasses) { BundleInfo info = bundleAnnotations.get(context.getBundle().getBundleId()); - if (info == null) return Collections.emptyList(); + if (info == null) { + return Collections.emptyList(); + } Pattern pattern = mergePatterns(annotations, false); List> result = null; if (includeDependentBundleClasses) { @@ -254,7 +256,9 @@ import org.slf4j.LoggerFactory; StringBuilder errors = new StringBuilder(); for (String name : annotatedClasses) { try { - if (excludes != null && excludes.contains(name)) continue; + if (excludes != null && excludes.contains(name)) { + continue; + } result.add(initBundle.loadClass(name)); } catch (ClassNotFoundException e) { errors.append(name).append(", "); @@ -276,7 +280,9 @@ import org.slf4j.LoggerFactory; if (c.endsWith("*")) { c = c.substring(0, c.length() - 1); } - if (regex.length() > 0) regex.append("|"); + if (regex.length() > 0) { + regex.append("|"); + } regex.append("^"); if (convert2signature) { regex.append("L").append(c.replaceAll("\\.", "/")); @@ -291,12 +297,16 @@ import org.slf4j.LoggerFactory; } private void validate(List> classes) { - if (classes == null || classes.size() == 0) return; + if (classes == null || classes.size() == 0) { + return; + } Map names = new HashMap(); StringBuilder conflictsMsg = new StringBuilder(); for (Class c : classes) { XmlRootElement root = c.getAnnotation(XmlRootElement.class); - if (root == null) continue; + if (root == null) { + continue; + } String rootName = root.name(); if ("##default".equals(rootName)) { String clsName = c.getSimpleName();