aboutsummaryrefslogtreecommitdiffstats
path: root/asdc-controller/src/main/java/org/openecomp/mso/asdc/util/NotificationLogging.java
diff options
context:
space:
mode:
authorMunir Ahmad <munir.ahmad@bell.ca>2018-03-07 18:59:13 -0500
committerMunir Ahmad <munir.ahmad@bell.ca>2018-03-07 18:59:13 -0500
commit0c4373663e22ffa18d953b2a9ee6f6b27d559bea (patch)
tree11d173cb5d2475c9e01f5b1526161f1e46492ee5 /asdc-controller/src/main/java/org/openecomp/mso/asdc/util/NotificationLogging.java
parent253187391a2a65cded398272b2f14b86f3ba8c95 (diff)
Make use of lambda
Change-Id: I482b874a3e7e686068450c7b5ddf45e2b8ae0d47 Issue-ID: SO-437 Signed-off-by: Munir Ahmad <munir.ahmad@bell.ca>
Diffstat (limited to 'asdc-controller/src/main/java/org/openecomp/mso/asdc/util/NotificationLogging.java')
-rw-r--r--asdc-controller/src/main/java/org/openecomp/mso/asdc/util/NotificationLogging.java20
1 files changed, 8 insertions, 12 deletions
diff --git a/asdc-controller/src/main/java/org/openecomp/mso/asdc/util/NotificationLogging.java b/asdc-controller/src/main/java/org/openecomp/mso/asdc/util/NotificationLogging.java
index c0a1f53283..f9871b745a 100644
--- a/asdc-controller/src/main/java/org/openecomp/mso/asdc/util/NotificationLogging.java
+++ b/asdc-controller/src/main/java/org/openecomp/mso/asdc/util/NotificationLogging.java
@@ -43,19 +43,15 @@ public class NotificationLogging implements InvocationHandler {
private static Map<Object, List<Method>> objectMethodsToLog = new HashMap<>();
protected static final MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.ASDC);
-
- private static InvocationHandler handler = new InvocationHandler() {
- @Override
- public Object invoke(Object arg0, Method arg1, Object[] arg2)
- throws Throwable {
- List<Method> methods = objectMethodsToLog.get(arg0);
- if ((methods == null) || (methods.isEmpty())) {
- // Do nothing for now...
- return null;
- }
- methods.add(arg1);
- return arg1.invoke(arg0, arg2);
+
+ private static InvocationHandler handler = (arg0, arg1, arg2) -> {
+ List<Method> methods = objectMethodsToLog.get(arg0);
+ if ((methods == null) || (methods.isEmpty())) {
+ // Do nothing for now...
+ return null;
}
+ methods.add(arg1);
+ return arg1.invoke(arg0, arg2);
};
public static InvocationHandler getHandler() {