Fix List initialisation issue in Renderer 64/100864/2
authorGilles Thouenon <gilles.thouenon@orange.com>
Thu, 28 Apr 2022 12:18:16 +0000 (14:18 +0200)
committerGilles Thouenon <gilles.thouenon@orange.com>
Mon, 2 May 2022 10:21:48 +0000 (12:21 +0200)
Avoid usage of anonymous class

JIRA: TRNSPRTPCE-661
Signed-off-by: Gilles Thouenon <gilles.thouenon@orange.com>
Change-Id: Ice0ee25d218317bbd0f8a6c3bf500c580ebd5db7

renderer/src/main/java/org/opendaylight/transportpce/renderer/openroadminterface/OpenRoadmInterface710.java

index 7fa28d5f540f2b0af70899e21b9943051c473005..57622990aebe8396cded20d0ceca5dd5991b59ab 100644 (file)
@@ -88,13 +88,7 @@ public class OpenRoadmInterface710 {
     private static final String RATE_EXCEPTION_MESSAGE =
         "Unable to get the rate";
     private static final String ODUC = "-ODUC";
-    private static final List<String> SUPPORTED_ODUCN_RATES = new ArrayList<>() {
-        {
-            add("2");
-            add("3");
-            add("4");
-        }
-    };
+    private static final List<String> SUPPORTED_ODUCN_RATES = List.of("2", "3", "4");
     private final PortMapping portMapping;
     private final OpenRoadmInterfaces openRoadmInterfaces;
     private static final Logger LOG = LoggerFactory.getLogger(OpenRoadmInterface710.class);