Fix extended community parser key generator 61/30061/1
authorMilos Fabian <milfabia@cisco.com>
Wed, 18 Nov 2015 10:43:36 +0000 (11:43 +0100)
committerMilos Fabian <milfabia@cisco.com>
Mon, 23 Nov 2015 07:15:39 +0000 (08:15 +0100)
Change-Id: Ie311b0f1a03b1475313f4c657ffa6d9147965ca9
Signed-off-by: Milos Fabian <milfabia@cisco.com>
bgp/parser-spi/src/main/java/org/opendaylight/protocol/bgp/parser/spi/pojo/SimpleExtendedCommunityRegistry.java

index 7b144f9f165b1507d084c90560bb1ea1513d7738..46f1abab2906dd5eaff14c0827e8b6debf310ed1 100644 (file)
@@ -36,7 +36,7 @@ final class SimpleExtendedCommunityRegistry implements ExtendedCommunityRegistry
     private final HandlerRegistry<DataContainer, ExtendedCommunityParser, ExtendedCommunitySerializer> handlers = new HandlerRegistry<>();
 
     private static int createKey(final int type, final int subtype) {
-        return (type << UNSIGNED_BYTE_MAX_VALUE) | subtype;
+        return (type << Byte.SIZE) | subtype;
     }
 
     @Override