*/
package org.openecomp.sdc.be.model.jsontitan.utils;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Formatter;
-import java.util.List;
-import java.util.Map;
-import java.util.Optional;
-import java.util.stream.Collectors;
-
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.collections.MapUtils;
import org.openecomp.sdc.be.datatypes.elements.InputDataDefinition;
import org.openecomp.sdc.be.model.Operation;
import org.openecomp.sdc.be.model.Resource;
+import java.util.*;
+import java.util.stream.Collectors;
+
public class InterfaceUtils {
public static final String INTERFACE_TOSCA_RESOURCE_NAME = "org.openecomp.interfaces.node.lifecycle.%s";
public static String createInterfaceToscaResourceName(String resourceName) {
StringBuilder sb = new StringBuilder();
- Formatter formatter = new Formatter(sb);
- return formatter.format(INTERFACE_TOSCA_RESOURCE_NAME, resourceName).toString();
+ try (Formatter formatter = new Formatter(sb)){
+ return formatter.format(INTERFACE_TOSCA_RESOURCE_NAME, resourceName).toString();
+ }
}
public static Map<String, Operation> getInterfaceOperationsFromInterfaces(