Fix findbug and checkstyle issues
[bgpcep.git] / bgp / path-selection-mode / src / main / java / org / opendaylight / protocol / bgp / mode / impl / add / OffsetMap.java
index ae57d35147e515a6bedc4475d71c7c2e7bac4e0c..9887dd3bd60ec5f8b9fa51e072fb2db7b2de4529 100644 (file)
@@ -32,18 +32,19 @@ import org.slf4j.LoggerFactory;
  * array members and array management features.
  */
 public final class OffsetMap {
-    static final OffsetMap EMPTY = new OffsetMap(Collections.emptySet());
     private static final Logger LOG = LoggerFactory.getLogger(OffsetMap.class);
     private static final String NEGATIVEOFFSET = "Invalid negative offset %s";
     private static final String INVALIDOFFSET = "Invalid offset %s for %s router IDs";
-    private static final LoadingCache<Set<RouteKey>, OffsetMap> OFFSETMAPS = CacheBuilder.newBuilder().weakValues().build(
-        new CacheLoader<Set<RouteKey>, OffsetMap>() {
-            @Override
-            public OffsetMap load(@Nonnull final Set<RouteKey> key) throws Exception {
-                return new OffsetMap(key);
-            }
-        });
+    private static final LoadingCache<Set<RouteKey>, OffsetMap> OFFSETMAPS = CacheBuilder.newBuilder().weakValues()
+        .build(new CacheLoader<Set<RouteKey>, OffsetMap>() {
+                @Override
+                public OffsetMap load(@Nonnull final Set<RouteKey> key) {
+                    return new OffsetMap(key);
+                }
+            });
     private static final Comparator<RouteKey> COMPARATOR = RouteKey::compareTo;
+    static final OffsetMap EMPTY = new OffsetMap(Collections.emptySet());
+
     private final RouteKey[] routeKeys;
 
     private OffsetMap(final Set<RouteKey> routerIds) {