Fix checkstyle in RIBSupportContextRegistry 17/80817/2
authorRobert Varga <robert.varga@pantheon.tech>
Wed, 13 Mar 2019 10:33:10 +0000 (11:33 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Wed, 13 Mar 2019 11:46:09 +0000 (12:46 +0100)
Just move a method to keep overload methods together.

Change-Id: I0790b25224317a1502e771f7c2beefbd43e8697e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
bgp/rib-impl/src/main/java/org/opendaylight/protocol/bgp/rib/impl/spi/RIBSupportContextRegistry.java

index d8348a66970a3f8aebd45ec246d1011ddccd8834..4ad18afc6a39acede2a729ad50c0eeefe258db42 100644 (file)
@@ -35,20 +35,25 @@ public interface RIBSupportContextRegistry {
     /**
      * Acquire a RIB Support Context for a AFI/SAFI combination.
      *
-     * @param key AFI/SAFI key
+     * @param key Tables key with AFI/SAFI key
      * @return RIBSupport instance, or null if the AFI/SAFI is not implemented.
      */
     @Nullable
-    RIBSupportContext getRIBSupportContext(TablesKey key);
+    default <C extends Routes & DataObject & ChoiceIn<Tables>, S extends ChildOf<? super C>,
+        R extends Route & ChildOf<? super S> & Identifiable<I>,
+        I extends Identifier<R>> RIBSupport<C, S, R, I> getRIBSupport(NodeIdentifierWithPredicates key) {
+        final RIBSupportContext support = getRIBSupportContext(key);
+        return support == null ? null : support.getRibSupport();
+    }
 
     /**
      * Acquire a RIB Support Context for a AFI/SAFI combination.
      *
-     * @param key Tables key with AFI/SAFI key
+     * @param key AFI/SAFI key
      * @return RIBSupport instance, or null if the AFI/SAFI is not implemented.
      */
     @Nullable
-    RIBSupportContext getRIBSupportContext(NodeIdentifierWithPredicates key);
+    RIBSupportContext getRIBSupportContext(TablesKey key);
 
     /**
      * Acquire a RIB Support Context for a AFI/SAFI combination.
@@ -57,10 +62,5 @@ public interface RIBSupportContextRegistry {
      * @return RIBSupport instance, or null if the AFI/SAFI is not implemented.
      */
     @Nullable
-    default <C extends Routes & DataObject & ChoiceIn<Tables>, S extends ChildOf<? super C>,
-        R extends Route & ChildOf<? super S> & Identifiable<I>,
-        I extends Identifier<R>> RIBSupport<C, S, R, I> getRIBSupport(NodeIdentifierWithPredicates key) {
-        final RIBSupportContext support = getRIBSupportContext(key);
-        return support == null ? null : support.getRibSupport();
-    }
+    RIBSupportContext getRIBSupportContext(NodeIdentifierWithPredicates key);
 }