aboutsummaryrefslogtreecommitdiffstats
path: root/asdc-controller/src/main/java/org/openecomp
diff options
context:
space:
mode:
Diffstat (limited to 'asdc-controller/src/main/java/org/openecomp')
-rw-r--r--asdc-controller/src/main/java/org/openecomp/mso/asdc/installer/heat/ToscaResourceInstaller.java57
-rw-r--r--asdc-controller/src/main/java/org/openecomp/mso/asdc/util/NotificationLogging.java20
2 files changed, 34 insertions, 43 deletions
diff --git a/asdc-controller/src/main/java/org/openecomp/mso/asdc/installer/heat/ToscaResourceInstaller.java b/asdc-controller/src/main/java/org/openecomp/mso/asdc/installer/heat/ToscaResourceInstaller.java
index 591db355c5..8c08d3eb26 100644
--- a/asdc-controller/src/main/java/org/openecomp/mso/asdc/installer/heat/ToscaResourceInstaller.java
+++ b/asdc-controller/src/main/java/org/openecomp/mso/asdc/installer/heat/ToscaResourceInstaller.java
@@ -419,39 +419,34 @@ public class ToscaResourceInstaller {// implements IVfResourceInstaller {
toscaResourceStruct.getSdcCsarHelper().getVfModulesByVf(vfCustomizationUUID);
logger.debug("vfGroups:" + vfGroups.toString());
- vfGroups.sort(new Comparator<Group>() {
-
- @Override
- public int compare(Group group1,
- Group group2) {
-
- // Field name1Field = group1.class.getDeclaredField("name");
- // name1Field.setAccessible(true);
- String thisName = group1.getName(); // (String)
- // name1Field.get(group1);
- String thatName = group2.getName(); // (String)
- // name1Field.get(group2);
-
- Matcher m = lastDigit.matcher(thisName);
- Matcher m2 = lastDigit.matcher(thatName);
-
- String thisDigit = "0";
- String thatDigit = "0";
- if (m.find()) {
- thisDigit = m.group();
- } else {
- return -1;
- }
- if (m2.find()) {
- thatDigit = m2.group();
- } else {
- return 1;
- }
+ vfGroups.sort((group1, group2) -> {
+
+ // Field name1Field = group1.class.getDeclaredField("name");
+ // name1Field.setAccessible(true);
+ String thisName = group1.getName(); // (String)
+ // name1Field.get(group1);
+ String thatName = group2.getName(); // (String)
+ // name1Field.get(group2);
+
+ Matcher m = lastDigit.matcher(thisName);
+ Matcher m2 = lastDigit.matcher(thatName);
+
+ String thisDigit = "0";
+ String thatDigit = "0";
+ if (m.find()) {
+ thisDigit = m.group();
+ } else {
+ return -1;
+ }
+ if (m2.find()) {
+ thatDigit = m2.group();
+ } else {
+ return 1;
+ }
- return new Integer(thisDigit).compareTo(new Integer(thatDigit));
+ return new Integer(thisDigit).compareTo(new Integer(thatDigit));
- }
- });
+ });
logger.debug("vfGroupsAfter:" + vfGroups.toString());
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() {