Use local variable type inference 53/107153/2
authorRobert Varga <robert.varga@pantheon.tech>
Mon, 31 Jul 2023 16:02:13 +0000 (18:02 +0200)
committerIvan Hrasko <ivan.hrasko@pantheon.tech>
Tue, 1 Aug 2023 07:04:32 +0000 (07:04 +0000)
Bind more tightly to TreeSet.

Change-Id: I6eb31f902a89bbce7396c3555581120f67120761
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
restconf/restconf-openapi/src/main/java/org/opendaylight/restconf/openapi/impl/BaseYangOpenApiGenerator.java

index bde578914369b2a1a12cdc84c0eb1746f7f3c62a..52780cadbed2c44271d3da7d849ff22effd09d3e 100644 (file)
@@ -416,7 +416,7 @@ public abstract class BaseYangOpenApiGenerator {
             return Collections.emptySortedSet();
         }
 
-        final SortedSet<Module> sortedModules = new TreeSet<>((module1, module2) -> {
+        final var sortedModules = new TreeSet<Module>((module1, module2) -> {
             int result = module1.getName().compareTo(module2.getName());
             if (result == 0) {
                 result = Revision.compare(module1.getRevision(), module2.getRevision());