Code Review
/
controller.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Fixed few sonar warnings.
[controller.git]
/
opendaylight
/
config
/
config-manager
/
src
/
main
/
java
/
org
/
opendaylight
/
controller
/
config
/
manager
/
impl
/
dynamicmbean
/
AnnotationsHelper.java
diff --git
a/opendaylight/config/config-manager/src/main/java/org/opendaylight/controller/config/manager/impl/dynamicmbean/AnnotationsHelper.java
b/opendaylight/config/config-manager/src/main/java/org/opendaylight/controller/config/manager/impl/dynamicmbean/AnnotationsHelper.java
index 7fa70ca10a3d2a3b1c734ff9b97ca1ced7f547e1..6859e4caf3f37dd086a512651146290e8306b53a 100644
(file)
--- a/
opendaylight/config/config-manager/src/main/java/org/opendaylight/controller/config/manager/impl/dynamicmbean/AnnotationsHelper.java
+++ b/
opendaylight/config/config-manager/src/main/java/org/opendaylight/controller/config/manager/impl/dynamicmbean/AnnotationsHelper.java
@@
-45,14
+45,15
@@
public class AnnotationsHelper {
}
// we need to go deeper
inspectedClass = inspectedClass.getSuperclass();
}
// we need to go deeper
inspectedClass = inspectedClass.getSuperclass();
+ // no need to go further
} catch (NoSuchMethodException e) {
} catch (NoSuchMethodException e) {
- inspectedClass = Object.class;
// no need to go further
+ inspectedClass = Object.class;
}
} while (!inspectedClass.equals(Object.class));
// inspect interfaces
for (Class<?> ifc : inspectedInterfaces) {
}
} while (!inspectedClass.equals(Object.class));
// inspect interfaces
for (Class<?> ifc : inspectedInterfaces) {
- if (
ifc.isInterface() == false
) {
+ if (
!ifc.isInterface()
) {
throw new IllegalArgumentException(ifc + " is not an interface");
}
try {
throw new IllegalArgumentException(ifc + " is not an interface");
}
try {
@@
-86,10
+87,10
@@
public class AnnotationsHelper {
result.add(annotation);
}
declaringClass = declaringClass.getSuperclass();
result.add(annotation);
}
declaringClass = declaringClass.getSuperclass();
- } while (
declaringClass.equals(Object.class) == false
);
+ } while (
!declaringClass.equals(Object.class)
);
// inspect interfaces
for (Class<?> ifc : interfaces) {
// inspect interfaces
for (Class<?> ifc : interfaces) {
- if (
ifc.isInterface() == false
) {
+ if (
!ifc.isInterface()
) {
throw new IllegalArgumentException(ifc + " is not an interface");
}
T annotation = ifc.getAnnotation(annotationType);
throw new IllegalArgumentException(ifc + " is not an interface");
}
T annotation = ifc.getAnnotation(annotationType);