Merge this if statement with the enclosing one
Issue-ID: AAF-876
Change-Id: I5c4642457c735d12343e058c14453adde2be3cb1
Signed-off-by: Thugutla sailakshmi <tsaila10@in.ibm.com>
* org.onap.aaf
* ===========================================================================
* Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
* org.onap.aaf
* ===========================================================================
* Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 IBM.
* ===========================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* ===========================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
for(String cls : classNames) {
try {
Class<?> c = cl.loadClass(cls);
for(String cls : classNames) {
try {
Class<?> c = cl.loadClass(cls);
- if(c!=null) {
- if(!Modifier.isAbstract(c.getModifiers())) {
- Constructor<?> cst = c.getConstructor(Access.class);
+ if((c!=null)&&(!Modifier.isAbstract(c.getModifiers()))) {
+ Constructor<?> cst = c.getConstructor(Access.class);
NotifyBody nb = (NotifyBody)cst.newInstance(access);
if(nb!=null) {
bodyMap.put("info|"+nb.name, nb);
bodyMap.put(nb.type+'|'+nb.name, nb);
NotifyBody nb = (NotifyBody)cst.newInstance(access);
if(nb!=null) {
bodyMap.put("info|"+nb.name, nb);
bodyMap.put(nb.type+'|'+nb.name, nb);
}
} catch (ClassNotFoundException | NoSuchMethodException | SecurityException | InstantiationException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
e.printStackTrace();
}
} catch (ClassNotFoundException | NoSuchMethodException | SecurityException | InstantiationException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
e.printStackTrace();