Code clean up 29/51229/6
authorClaudio D. Gasparini <cgaspari@cisco.com>
Tue, 31 Jan 2017 10:47:45 +0000 (11:47 +0100)
committerMilos Fabian <milos.fabian@pantheon.tech>
Tue, 14 Feb 2017 15:59:37 +0000 (15:59 +0000)
Remove redundant cast/type argument

Change-Id: I446cb24bdbcb5156136899798eb6d3d607291e62
Signed-off-by: Claudio D. Gasparini <cgaspari@cisco.com>
72 files changed:
bgp/benchmark-app/src/main/java/org/opendaylight/protocol/bgp/benchmark/app/AppPeerBenchmark.java
bgp/benchmark-app/src/test/java/org/opendaylight/protocol/bgp/benchmark/app/AppPeerBenchmarkTest.java
bgp/bmp-impl/src/main/java/org/opendaylight/controller/config/yang/bmp/impl/BmpMonitorImplModule.java
bgp/bmp-impl/src/main/java/org/opendaylight/protocol/bmp/impl/app/BmpMonitoringStationImpl.java
bgp/bmp-impl/src/main/java/org/opendaylight/protocol/bmp/impl/app/TablesUtil.java
bgp/bmp-impl/src/test/java/org/opendaylight/protocol/bmp/impl/session/BmpDispatcherImplTest.java
bgp/bmp-mock/src/test/java/org/opendaylight/protocol/bmp/mock/BmpMockDispatcherTest.java
bgp/bmp-mock/src/test/java/org/opendaylight/protocol/bmp/mock/BmpMockTest.java
bgp/bmp-parser-impl/src/main/java/org/opendaylight/protocol/bmp/parser/message/InitiationHandler.java
bgp/bmp-parser-impl/src/main/java/org/opendaylight/protocol/bmp/parser/message/TerminationHandler.java
bgp/bmp-spi/src/test/java/org/opendaylight/protocol/bmp/spi/registry/SimpleBmpMessageRegistryTest.java
bgp/flowspec/src/test/java/org/opendaylight/protocol/bgp/flowspec/FlowspecL3vpnIpv6NlriParserTest.java
bgp/flowspec/src/test/java/org/opendaylight/protocol/bgp/flowspec/SimpleFlowspecIpv4NlriParserTest.java
bgp/flowspec/src/test/java/org/opendaylight/protocol/bgp/flowspec/SimpleFlowspecIpv6NlriParserTest.java
bgp/inet/src/main/java/org/opendaylight/protocol/bgp/inet/RIBActivator.java
bgp/inet/src/test/java/org/opendaylight/protocol/bgp/inet/codec/BGPParserTest.java
bgp/linkstate/src/test/java/org/opendaylight/protocol/bgp/linkstate/ParserTest.java
bgp/linkstate/src/test/java/org/opendaylight/protocol/bgp/linkstate/SrAttributeParserTest.java
bgp/parser-impl/src/main/java/org/opendaylight/protocol/bgp/parser/impl/message/update/AsPathAttributeParser.java
bgp/parser-impl/src/main/java/org/opendaylight/protocol/bgp/parser/impl/message/update/AsPathSegmentParser.java
bgp/parser-impl/src/test/java/org/opendaylight/protocol/bgp/parser/impl/BGPParserTest.java
bgp/parser-impl/src/test/java/org/opendaylight/protocol/bgp/parser/impl/GracefulCapabilityHandlerTest.java
bgp/parser-impl/src/test/java/org/opendaylight/protocol/bgp/parser/impl/message/update/UnrecognizedAttributesSerializerTest.java
bgp/path-selection-mode/src/main/java/org/opendaylight/protocol/bgp/mode/impl/BestPathStateImpl.java
bgp/path-selection-mode/src/main/java/org/opendaylight/protocol/bgp/mode/spi/AbstractBestPathSelector.java
bgp/rib-impl/src/main/java/org/opendaylight/protocol/bgp/rib/impl/AdjRibOutListener.java
bgp/rib-impl/src/main/java/org/opendaylight/protocol/bgp/rib/impl/AttributeOperations.java
bgp/rib-impl/src/main/java/org/opendaylight/protocol/bgp/rib/impl/BGPSessionImpl.java
bgp/rib-impl/src/test/java/org/opendaylight/controller/config/yang/bgp/rib/impl/BGPPeerModuleTest.java
bgp/rib-impl/src/test/java/org/opendaylight/protocol/bgp/rib/impl/BGPSessionImplTest.java
bgp/rib-impl/src/test/java/org/opendaylight/protocol/bgp/rib/impl/FSMTest.java
bgp/rib-impl/src/test/java/org/opendaylight/protocol/bgp/rib/impl/StrictBGPPeerRegistryTest.java
bgp/rib-spi/src/main/java/org/opendaylight/protocol/bgp/rib/spi/RibSupportUtils.java
bgp/topology-provider/src/main/java/org/opendaylight/bgpcep/bgp/topology/provider/AbstractReachabilityTopologyBuilder.java
bgp/topology-provider/src/main/java/org/opendaylight/bgpcep/bgp/topology/provider/AbstractTopologyBuilder.java
bgp/topology-provider/src/test/java/org/opendaylight/bgpcep/bgp/topology/provider/AbstractTopologyBuilderTest.java
data-change-counter/src/test/java/org/opendaylight/controller/config/yang/bgpcep/data/change/counter/DataChangeCounterImplModuleTest.java
integration-tests/src/test/java/org/opendaylight/protocol/integration/pcep/PcepRpcServicesRoutingTest.java
pcep/auto-bandwidth-extension/src/test/java/org/opendaylight/protocol/pcep/auto/bandwidth/extension/PcRptMessageCodecTest.java
pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/message/PCEPErrorMessageParser.java
pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/message/PCEPMonitoringReplyMessageParser.java
pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/message/PCEPMonitoringRequestMessageParser.java
pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/message/PCEPNotificationMessageParser.java
pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/message/PCEPReplyMessageParser.java
pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/message/PCEPRequestMessageParser.java
pcep/ietf-stateful07/src/main/java/org/opendaylight/protocol/pcep/ietf/stateful07/PathBindingTlvParser.java
pcep/ietf-stateful07/src/main/java/org/opendaylight/protocol/pcep/ietf/stateful07/Stateful07ErrorMessageParser.java
pcep/ietf-stateful07/src/main/java/org/opendaylight/protocol/pcep/ietf/stateful07/Stateful07PCReportMessageParser.java
pcep/ietf-stateful07/src/main/java/org/opendaylight/protocol/pcep/ietf/stateful07/Stateful07PCUpdateRequestMessageParser.java
pcep/impl/src/test/java/org/opendaylight/protocol/pcep/impl/PCEPValidatorTest.java
pcep/pcc-mock/src/main/java/org/opendaylight/protocol/pcep/pcc/mock/PCCTunnelManagerImpl.java
pcep/pcc-mock/src/main/java/org/opendaylight/protocol/pcep/pcc/mock/TimerHandler.java
pcep/pcc-mock/src/main/java/org/opendaylight/protocol/pcep/pcc/mock/spi/MsgBuilderUtil.java
pcep/pcc-mock/src/test/java/org/opendaylight/protocol/pcep/pcc/mock/PCCSessionListenerTest.java
pcep/pcc-mock/src/test/java/org/opendaylight/protocol/pcep/pcc/mock/PCCSyncAvoidanceProcedureTest.java
pcep/pcc-mock/src/test/java/org/opendaylight/protocol/pcep/pcc/mock/PCCTunnelManagerImplTest.java
pcep/spi/src/test/java/org/opendaylight/protocol/pcep/spi/AbstractMessageParserTest.java
pcep/spi/src/test/java/org/opendaylight/protocol/pcep/spi/RegistryTest.java
pcep/topology-provider/src/main/java/org/opendaylight/bgpcep/pcep/topology/provider/OperationResults.java
pcep/topology-provider/src/main/java/org/opendaylight/bgpcep/pcep/topology/provider/Stateful07TopologySessionListener.java
pcep/topology-provider/src/test/java/org/opendaylight/bgpcep/pcep/topology/provider/AbstractPCEPSessionTest.java
pcep/topology-provider/src/test/java/org/opendaylight/bgpcep/pcep/topology/provider/IncrementalSynchronizationProcedureTest.java
pcep/topology-provider/src/test/java/org/opendaylight/bgpcep/pcep/topology/provider/PCEPTriggeredReSynchronizationProcedureTest.java
pcep/topology-provider/src/test/java/org/opendaylight/bgpcep/pcep/topology/provider/PCETriggeredInitialSyncProcedureTest.java
pcep/topology-provider/src/test/java/org/opendaylight/bgpcep/pcep/topology/provider/StateSynchronizationAvoidanceProcedureTest.java
pcep/topology-provider/src/test/java/org/opendaylight/bgpcep/pcep/topology/provider/Stateful07TopologySessionListenerTest.java
pcep/tunnel-provider/src/main/java/org/opendaylight/bgpcep/pcep/tunnel/provider/CreateTunnelInstructionExecutor.java
pcep/tunnel-provider/src/main/java/org/opendaylight/bgpcep/pcep/tunnel/provider/TunelProgrammingUtil.java
pcep/tunnel-provider/src/test/java/org/opendaylight/bgpcep/pcep/tunnel/provider/NodeChangedListenerTest.java
pcep/tunnel-provider/src/test/java/org/opendaylight/bgpcep/pcep/tunnel/provider/TunnelProgrammingTest.java
programming/impl/src/main/java/org/opendaylight/bgpcep/programming/impl/ProgrammingServiceImpl.java
programming/impl/src/test/java/org/opendaylight/bgpcep/programming/impl/ProgrammingServiceImplTest.java

index 17593c08418352a9d43954e5dee1adbc2faca3e7..81efd3d241721d2ee60dc9682424f8d0aec3d5fd 100644 (file)
@@ -119,7 +119,7 @@ public class AppPeerBenchmark implements OdlBgpAppPeerBenchmarkService, Transact
                 .setSafi(UnicastSubsequentAddressFamily.class)
                 .setRoutes(
                         new Ipv4RoutesCaseBuilder().setIpv4Routes(
-                                new Ipv4RoutesBuilder().setIpv4Route(Collections.<Ipv4Route> emptyList()).build())
+                                new Ipv4RoutesBuilder().setIpv4Route(Collections.emptyList()).build())
                                 .build()).build();
 
         final ApplicationRib appRib = new ApplicationRibBuilder()
index 620d6cfe6709a92f827b1fddf8f8e4a90a04dd16..b7cbfc5570df9868b48d56b64cd6086bb2efe058 100644 (file)
@@ -65,7 +65,7 @@ public class AppPeerBenchmarkTest extends AbstractDataBrokerTest {
     @Before
     public void setUp() throws MalformedObjectNameException {
         MockitoAnnotations.initMocks(this);
-        Mockito.doReturn(this.registration).when(this.rpcRegistry).addRpcImplementation(Mockito.<Class<OdlBgpAppPeerBenchmarkService>>any(),
+        Mockito.doReturn(this.registration).when(this.rpcRegistry).addRpcImplementation(Mockito.any(),
                 Mockito.any(OdlBgpAppPeerBenchmarkService.class));
         Mockito.doNothing().when(this.registration).close();
         this.appPeerBenchmark = new AppPeerBenchmark(getDataBroker(), this.rpcRegistry, PEER_RIB_ID);
index 66c144c1b85b9b8da490f860a7e5219d92b17c90..242b72769b6ee8021e6595d12a3b3995e008eeb6 100644 (file)
@@ -69,7 +69,7 @@ public class BmpMonitorImplModule extends org.opendaylight.controller.config.yan
             }
         }
 
-        return ret.isEmpty() ? Optional.<KeyMapping>absent() : Optional.<KeyMapping>of(ret);
+        return ret.isEmpty() ? Optional.absent() : Optional.of(ret);
     }
 
     @Override
index f93876c28faae3f2327ab59e9249d758c7475d4b..76a13566b73aa3fc0e049c14e267b3aadc37495e 100644 (file)
@@ -88,7 +88,7 @@ public final class BmpMonitoringStationImpl implements BmpMonitoringStation {
                     ret = KeyMapping.getKeyMapping(addr, rfc2385KeyPassword.getValue());
                     dispatcher.createClient(
                         Ipv4Util.toInetSocketAddress(mr.getAddress(), mr.getPort()),
-                        this.sessionManager, Optional.<KeyMapping>fromNullable(ret));
+                        this.sessionManager, Optional.fromNullable(ret));
                 }
             }
         }
index 6103be9261ffbf68f60f88394fbad85626201bda..5e72ba8d12059329601241c172e7ce69c9951ef0 100644 (file)
@@ -37,7 +37,7 @@ public final class TablesUtil {
      */
     public static NodeIdentifierWithPredicates toYangTablesKey(final Class<? extends AddressFamily> afi,
             final Class<? extends SubsequentAddressFamily> safi) {
-        final ImmutableMap<QName, Object> keyValues = ImmutableMap.<QName, Object>of(
+        final ImmutableMap<QName, Object> keyValues = ImmutableMap.of(
                         BMP_AFI_QNAME, BindingReflections.findQName(afi),
                         BMP_SAFI_QNAME, BindingReflections.findQName(safi));
         return new NodeIdentifierWithPredicates(BMP_TABLES_QNAME, keyValues);
@@ -55,7 +55,7 @@ public final class TablesUtil {
             final Class<? extends SubsequentAddressFamily> safi) {
         final QName afiQname = QName.create(nodeName, "afi").intern();
         final QName safiQname = QName.create(nodeName, "safi").intern();
-        final ImmutableMap<QName, Object> keyValues = ImmutableMap.<QName, Object>of(
+        final ImmutableMap<QName, Object> keyValues = ImmutableMap.of(
                         afiQname, BindingReflections.findQName(afi),
                         safiQname, BindingReflections.findQName(safi));
         return new NodeIdentifierWithPredicates(nodeName, keyValues);
index 82463e25a31b66ca15ae4c00735d614148df75bd..7575692dded3f9c3a113189ab60862141b798b49 100644 (file)
@@ -88,9 +88,9 @@ public class BmpDispatcherImplTest {
 
     @Test
     public void testCreateServer() throws Exception {
-        final Channel serverChannel = this.dispatcher.createServer(SERVER, this.mockedListenerFactory, Optional.<KeyMapping>absent()).await().channel();
+        final Channel serverChannel = this.dispatcher.createServer(SERVER, this.mockedListenerFactory, Optional.absent()).await().channel();
         Assert.assertTrue(serverChannel.isActive());
-        final Channel clientChannel = this.dispatcher.createClient(CLIENT_REMOTE, this.mockedListenerFactory, Optional.<KeyMapping>absent()).await().channel();
+        final Channel clientChannel = this.dispatcher.createClient(CLIENT_REMOTE, this.mockedListenerFactory, Optional.absent()).await().channel();
         Assert.assertTrue(clientChannel.isActive());
         Thread.sleep(500);
         Mockito.verify(this.mockedSession, Mockito.times(2)).handlerAdded(Mockito.any(ChannelHandlerContext.class));
index 298194009c43dd6cac01996a405d8f91655bd888..84710a0c199cb68e7e3867457a6bafb7980ae6f5 100644 (file)
@@ -39,7 +39,7 @@ public class BmpMockDispatcherTest {
         final InetSocketAddress serverAddr = InetSocketAddressUtil.getRandomLoopbackInetSocketAddress(port);
         final BmpDispatcherImpl serverDispatcher = new BmpDispatcherImpl(new NioEventLoopGroup(), new NioEventLoopGroup(),
             this.registry, this.sessionFactory);
-        final ChannelFuture futureServer = serverDispatcher.createServer(serverAddr, this.slf, Optional.<KeyMapping>absent());
+        final ChannelFuture futureServer = serverDispatcher.createServer(serverAddr, this.slf, Optional.absent());
         waitFutureComplete(futureServer);
         final ChannelFuture channelFuture = dispatcher.createClient(InetSocketAddressUtil.getRandomLoopbackInetSocketAddress(0),
             serverAddr);
@@ -59,7 +59,7 @@ public class BmpMockDispatcherTest {
             this.registry, this.sessionFactory);
         final ChannelFuture futureServer = dispatcher.createServer(new InetSocketAddress(InetAddresses.forString("0.0.0.0"), port));
         waitFutureComplete(futureServer);
-        final ChannelFuture channelFuture = serverDispatcher.createClient(InetSocketAddressUtil.getRandomLoopbackInetSocketAddress(port), this.slf, Optional.<KeyMapping>absent());
+        final ChannelFuture channelFuture = serverDispatcher.createClient(InetSocketAddressUtil.getRandomLoopbackInetSocketAddress(port), this.slf, Optional.absent());
         waitFutureComplete(channelFuture);
         final Channel channel = channelFuture.sync().channel();
 
index 388ed30c4099270b8898d26c3d34363fc81f6af3..766766f2a4366ac4d1e7a5569676cc679ac21c63 100644 (file)
@@ -62,7 +62,7 @@ public class BmpMockTest {
         final InetSocketAddress serverAddr = InetSocketAddressUtil.getRandomLoopbackInetSocketAddress();
         final BmpSessionListenerFactory bmpSessionListenerFactory = () -> BmpMockTest.this.sessionListener;
         final ChannelFuture futureServer = bmpDispatcher.createServer(serverAddr,
-            bmpSessionListenerFactory, Optional.<KeyMapping>absent());
+            bmpSessionListenerFactory, Optional.absent());
         waitFutureComplete(futureServer);
         Channel serverChannel;
         int sessionUpWait;
@@ -95,7 +95,7 @@ public class BmpMockTest {
         BmpMock.main(new String[]{"--local_address", InetSocketAddressUtil.toHostAndPort(serverAddr).toString(),
             "--peers_count", "3", "--pre_policy_routes", "3", "--passive"});
         final ChannelFuture futureServer = bmpDispatcher.createClient(serverAddr,
-            bmpSessionListenerFactory, Optional.<KeyMapping>absent());
+            bmpSessionListenerFactory, Optional.absent());
         waitFutureComplete(futureServer);
         Channel serverChannel;
         int sessionUpWait;
index b40992825cfb04212d53a804ffe9909273ae7d29..325159fec529f1b3b60673618c9aa0e0a6934ecb 100644 (file)
@@ -49,7 +49,7 @@ public class InitiationHandler extends AbstractBmpMessageWithTlvParser<TlvsBuild
     public Notification parseMessageBody(final ByteBuf bytes) throws BmpDeserializationException {
         final InitiationMessageBuilder initiationBuilder = new InitiationMessageBuilder();
         final TlvsBuilder tlvsBuilder = new TlvsBuilder();
-        tlvsBuilder.setStringInformation(ImmutableList.<StringInformation>of());
+        tlvsBuilder.setStringInformation(ImmutableList.of());
         parseTlvs(tlvsBuilder, bytes);
 
         if (tlvsBuilder.getDescriptionTlv() == null || tlvsBuilder.getDescriptionTlv().getDescription() == null) {
index db80561c56a4f4e42e7e98ac80e27d33357784f4..2f051b0b185521da401d7f76f29268a3d6d32a5a 100644 (file)
@@ -41,7 +41,7 @@ public class TerminationHandler extends AbstractBmpMessageWithTlvParser<TlvsBuil
     public Notification parseMessageBody(final ByteBuf bytes) throws BmpDeserializationException {
         final TerminationMessageBuilder terminationMessage = new TerminationMessageBuilder();
         final TlvsBuilder tlvsBuilder = new TlvsBuilder();
-        tlvsBuilder.setStringInformation(ImmutableList.<StringInformation>of());
+        tlvsBuilder.setStringInformation(ImmutableList.of());
         parseTlvs(tlvsBuilder, bytes);
         if (tlvsBuilder.getReasonTlv() == null || tlvsBuilder.getReasonTlv().getReason() == null) {
             throw new BmpDeserializationException("Inclusion of Reason TLV is mandatory.");
index dfb9e0f1721ecb4677e0cb581088c5bee47ac266..0c90f22c2c4cc2d448095f379a63a891302347fb 100644 (file)
@@ -46,7 +46,7 @@ public class SimpleBmpMessageRegistryTest {
         this.registry.registerBmpMessageSerializer(BmpTestMessage.class, bmpTestParser);
         final BmpTestMessage message = new BmpTestMessage(257);
 
-        assertEquals(message.toString(), ((BmpTestMessage)this.registry.parseMessage(Unpooled.copiedBuffer(BMP_TEST_MESSAGE))).toString());
+        assertEquals(message.toString(), this.registry.parseMessage(Unpooled.copiedBuffer(BMP_TEST_MESSAGE)).toString());
 
         final ByteBuf aggregator = Unpooled.buffer(BMP_TEST_MESSAGE.length);
         this.registry.serializeMessage(message, aggregator);
index 72d060df98892cb85bb75025a628ac4f21c2e292..c8c0fda3aa37ca84c07ce68bc8dc178567852b49 100644 (file)
@@ -356,11 +356,11 @@ public class FlowspecL3vpnIpv6NlriParserTest {
                     .withNodeIdentifier(AbstractFlowspecNlriParser.FLOWSPEC_TYPE_NID)
                     .withChild(Builders.unkeyedListBuilder().withNodeIdentifier(AbstractFlowspecNlriParser.FRAGMENT_NID)
                         .withChild(Builders.unkeyedListEntryBuilder().withNodeIdentifier(FlowspecL3vpnIpv6NlriParser.OP_NID)
-                            .withChild(Builders.leafBuilder().withNodeIdentifier(FlowspecL3vpnIpv6NlriParser.OP_NID).withValue(Sets.<String>newHashSet(AbstractOperandParser.AND_BIT_VALUE, AbstractOperandParser.END_OF_LIST_VALUE, BitmaskOperandParser.MATCH_VALUE, BitmaskOperandParser.NOT_VALUE)).build())
+                            .withChild(Builders.leafBuilder().withNodeIdentifier(FlowspecL3vpnIpv6NlriParser.OP_NID).withValue(Sets.newHashSet(AbstractOperandParser.AND_BIT_VALUE, AbstractOperandParser.END_OF_LIST_VALUE, BitmaskOperandParser.MATCH_VALUE, BitmaskOperandParser.NOT_VALUE)).build())
                             .withChild(Builders.leafBuilder().withNodeIdentifier(FlowspecL3vpnIpv6NlriParser.VALUE_NID).withValue(Sets.newHashSet(AbstractFlowspecNlriParser.DO_NOT_VALUE, AbstractFlowspecNlriParser.FIRST_VALUE, AbstractFlowspecNlriParser.IS_A_VALUE, AbstractFlowspecNlriParser.LAST_VALUE)).build()).build())
                         .build()).build()).build()).build());
         final FlowspecBuilder expectedFS = new FlowspecBuilder();
-        expectedFS.setFlowspecType(new FragmentCaseBuilder().setFragments(Lists.<Fragments>newArrayList(new FragmentsBuilder().setValue(new Fragment(true, true, true, true)).setOp(new BitmaskOperand(true, true, true, true)).build())).build());
+        expectedFS.setFlowspecType(new FragmentCaseBuilder().setFragments(Lists.newArrayList(new FragmentsBuilder().setValue(new Fragment(true, true, true, true)).setOp(new BitmaskOperand(true, true, true, true)).build())).build());
         final List<Flowspec> expectedValue = new ArrayList<>();
         expectedValue.add(expectedFS.build());
         assertEquals(expectedValue, FS_PARSER.extractFlowspec(entry.build()));
@@ -378,18 +378,18 @@ public class FlowspecL3vpnIpv6NlriParserTest {
                     .withNodeIdentifier(AbstractFlowspecNlriParser.FLOWSPEC_TYPE_NID)
                     .withChild(Builders.unkeyedListBuilder().withNodeIdentifier(NEXT_HEADER_NID)
                         .withChild(Builders.unkeyedListEntryBuilder().withNodeIdentifier(NEXT_HEADER_NID)
-                            .withChild(Builders.leafBuilder().withNodeIdentifier(FlowspecL3vpnIpv6NlriParser.OP_NID).withValue(Sets.<String>newHashSet(AbstractOperandParser.END_OF_LIST_VALUE, AbstractOperandParser.AND_BIT_VALUE)).build())
+                            .withChild(Builders.leafBuilder().withNodeIdentifier(FlowspecL3vpnIpv6NlriParser.OP_NID).withValue(Sets.newHashSet(AbstractOperandParser.END_OF_LIST_VALUE, AbstractOperandParser.AND_BIT_VALUE)).build())
                             .withChild(Builders.leafBuilder().withNodeIdentifier(FlowspecL3vpnIpv6NlriParser.VALUE_NID).withValue((short) 100).build()).build())
                         .withChild(Builders.unkeyedListEntryBuilder().withNodeIdentifier(NEXT_HEADER_NID)
-                            .withChild(Builders.leafBuilder().withNodeIdentifier(FlowspecL3vpnIpv6NlriParser.OP_NID).withValue(Sets.<String>newHashSet(AbstractOperandParser.AND_BIT_VALUE)).build())
+                            .withChild(Builders.leafBuilder().withNodeIdentifier(FlowspecL3vpnIpv6NlriParser.OP_NID).withValue(Sets.newHashSet(AbstractOperandParser.AND_BIT_VALUE)).build())
                             .withChild(Builders.leafBuilder().withNodeIdentifier(FlowspecL3vpnIpv6NlriParser.VALUE_NID).withValue((short) 200).build()).build())
                         .withChild(Builders.unkeyedListEntryBuilder().withNodeIdentifier(NEXT_HEADER_NID)
-                            .withChild(Builders.leafBuilder().withNodeIdentifier(FlowspecL3vpnIpv6NlriParser.OP_NID).withValue(Sets.<String>newHashSet(AbstractOperandParser.END_OF_LIST_VALUE, AbstractOperandParser.AND_BIT_VALUE, AbstractNumericOperandParser.EQUALS_VALUE)).build())
+                            .withChild(Builders.leafBuilder().withNodeIdentifier(FlowspecL3vpnIpv6NlriParser.OP_NID).withValue(Sets.newHashSet(AbstractOperandParser.END_OF_LIST_VALUE, AbstractOperandParser.AND_BIT_VALUE, AbstractNumericOperandParser.EQUALS_VALUE)).build())
                             .withChild(Builders.leafBuilder().withNodeIdentifier(FlowspecL3vpnIpv6NlriParser.VALUE_NID).withValue((short) 210).build()).build())
                         .build()).build()).build()).build());
 
         final FlowspecBuilder expectedFS = new FlowspecBuilder();
-        expectedFS.setFlowspecType(new NextHeaderCaseBuilder().setNextHeaders(Lists.<NextHeaders>newArrayList(
+        expectedFS.setFlowspecType(new NextHeaderCaseBuilder().setNextHeaders(Lists.newArrayList(
             new NextHeadersBuilder().setValue((short) 100).setOp(new NumericOperand(true, true, false, false, false)).build(),
             new NextHeadersBuilder().setValue((short) 200).setOp(new NumericOperand(true, false, false, false, false)).build(),
             new NextHeadersBuilder().setValue((short) 210).setOp(new NumericOperand(true, true, true, false, false)).build())).build());
@@ -410,15 +410,15 @@ public class FlowspecL3vpnIpv6NlriParserTest {
                     .withNodeIdentifier(AbstractFlowspecNlriParser.FLOWSPEC_TYPE_NID)
                     .withChild(Builders.unkeyedListBuilder().withNodeIdentifier(FLOW_LABEL_NID)
                         .withChild(Builders.unkeyedListEntryBuilder().withNodeIdentifier(FLOW_LABEL_NID)
-                            .withChild(Builders.leafBuilder().withNodeIdentifier(FlowspecL3vpnIpv6NlriParser.OP_NID).withValue(Sets.<String>newHashSet(AbstractOperandParser.END_OF_LIST_VALUE, AbstractOperandParser.AND_BIT_VALUE)).build())
+                            .withChild(Builders.leafBuilder().withNodeIdentifier(FlowspecL3vpnIpv6NlriParser.OP_NID).withValue(Sets.newHashSet(AbstractOperandParser.END_OF_LIST_VALUE, AbstractOperandParser.AND_BIT_VALUE)).build())
                             .withChild(Builders.leafBuilder().withNodeIdentifier(FlowspecL3vpnIpv6NlriParser.VALUE_NID).withValue(100L).build()).build())
                         .withChild(Builders.unkeyedListEntryBuilder().withNodeIdentifier(FLOW_LABEL_NID)
-                            .withChild(Builders.leafBuilder().withNodeIdentifier(FlowspecL3vpnIpv6NlriParser.OP_NID).withValue(Sets.<String>newHashSet(AbstractOperandParser.AND_BIT_VALUE)).build())
+                            .withChild(Builders.leafBuilder().withNodeIdentifier(FlowspecL3vpnIpv6NlriParser.OP_NID).withValue(Sets.newHashSet(AbstractOperandParser.AND_BIT_VALUE)).build())
                             .withChild(Builders.leafBuilder().withNodeIdentifier(FlowspecL3vpnIpv6NlriParser.VALUE_NID).withValue(200L).build()).build())
                         .build()).build()).build()).build());
 
         final FlowspecBuilder expectedFS = new FlowspecBuilder();
-        expectedFS.setFlowspecType(new FlowLabelCaseBuilder().setFlowLabel(Lists.<FlowLabel>newArrayList(
+        expectedFS.setFlowspecType(new FlowLabelCaseBuilder().setFlowLabel(Lists.newArrayList(
             new FlowLabelBuilder().setValue(100L).setOp(new NumericOperand(true, true, false, false, false)).build(),
             new FlowLabelBuilder().setValue(200L).setOp(new NumericOperand(true, false, false, false, false)).build())).build());
         final List<Flowspec> expectedValue = new ArrayList<>();
index 2f04afcbc0d412aced3376635febbc373a6b618d..c943928989a379a3006a501a24acca0f0a94daae 100644 (file)
@@ -535,18 +535,18 @@ public class SimpleFlowspecIpv4NlriParserTest {
                     .withNodeIdentifier(AbstractFlowspecNlriParser.FLOWSPEC_TYPE_NID)
                     .withChild(Builders.unkeyedListBuilder().withNodeIdentifier(PROTOCOL_IP_NID)
                         .withChild(Builders.unkeyedListEntryBuilder().withNodeIdentifier(PROTOCOL_IP_NID)
-                            .withChild(Builders.leafBuilder().withNodeIdentifier(AbstractFlowspecNlriParser.OP_NID).withValue(Sets.<String>newHashSet(AbstractOperandParser.END_OF_LIST_VALUE, AbstractOperandParser.AND_BIT_VALUE)).build())
+                            .withChild(Builders.leafBuilder().withNodeIdentifier(AbstractFlowspecNlriParser.OP_NID).withValue(Sets.newHashSet(AbstractOperandParser.END_OF_LIST_VALUE, AbstractOperandParser.AND_BIT_VALUE)).build())
                             .withChild(Builders.leafBuilder().withNodeIdentifier(AbstractFlowspecNlriParser.VALUE_NID).withValue((short) 100).build()).build())
                         .withChild(Builders.unkeyedListEntryBuilder().withNodeIdentifier(PROTOCOL_IP_NID)
-                            .withChild(Builders.leafBuilder().withNodeIdentifier(AbstractFlowspecNlriParser.OP_NID).withValue(Sets.<String>newHashSet(AbstractOperandParser.AND_BIT_VALUE)).build())
+                            .withChild(Builders.leafBuilder().withNodeIdentifier(AbstractFlowspecNlriParser.OP_NID).withValue(Sets.newHashSet(AbstractOperandParser.AND_BIT_VALUE)).build())
                             .withChild(Builders.leafBuilder().withNodeIdentifier(AbstractFlowspecNlriParser.VALUE_NID).withValue((short) 200).build()).build())
                         .withChild(Builders.unkeyedListEntryBuilder().withNodeIdentifier(PROTOCOL_IP_NID)
-                            .withChild(Builders.leafBuilder().withNodeIdentifier(AbstractFlowspecNlriParser.OP_NID).withValue(Sets.<String>newHashSet(AbstractOperandParser.END_OF_LIST_VALUE, AbstractOperandParser.AND_BIT_VALUE, AbstractNumericOperandParser.EQUALS_VALUE)).build())
+                            .withChild(Builders.leafBuilder().withNodeIdentifier(AbstractFlowspecNlriParser.OP_NID).withValue(Sets.newHashSet(AbstractOperandParser.END_OF_LIST_VALUE, AbstractOperandParser.AND_BIT_VALUE, AbstractNumericOperandParser.EQUALS_VALUE)).build())
                             .withChild(Builders.leafBuilder().withNodeIdentifier(AbstractFlowspecNlriParser.VALUE_NID).withValue((short) 240).build()).build())
                         .build()).build()).build()).build());
 
         final FlowspecBuilder expectedFS = new FlowspecBuilder();
-        expectedFS.setFlowspecType(new ProtocolIpCaseBuilder().setProtocolIps(Lists.<ProtocolIps>newArrayList(
+        expectedFS.setFlowspecType(new ProtocolIpCaseBuilder().setProtocolIps(Lists.newArrayList(
             new ProtocolIpsBuilder().setValue((short) 100).setOp(new NumericOperand(true, true, false, false, false)).build(),
             new ProtocolIpsBuilder().setValue((short) 200).setOp(new NumericOperand(true, false, false, false, false)).build(),
             new ProtocolIpsBuilder().setValue((short) 240).setOp(new NumericOperand(true, true, true, false, false)).build())).build());
@@ -567,12 +567,12 @@ public class SimpleFlowspecIpv4NlriParserTest {
                     .withNodeIdentifier(AbstractFlowspecNlriParser.FLOWSPEC_TYPE_NID)
                     .withChild(Builders.unkeyedListBuilder().withNodeIdentifier(AbstractFlowspecNlriParser.PORTS_NID)
                         .withChild(Builders.unkeyedListEntryBuilder().withNodeIdentifier(PROTOCOL_IP_NID)
-                            .withChild(Builders.leafBuilder().withNodeIdentifier(AbstractFlowspecNlriParser.OP_NID).withValue(Sets.<String>newHashSet(AbstractOperandParser.END_OF_LIST_VALUE, AbstractOperandParser.AND_BIT_VALUE, AbstractNumericOperandParser.LESS_THAN_VALUE)).build())
+                            .withChild(Builders.leafBuilder().withNodeIdentifier(AbstractFlowspecNlriParser.OP_NID).withValue(Sets.newHashSet(AbstractOperandParser.END_OF_LIST_VALUE, AbstractOperandParser.AND_BIT_VALUE, AbstractNumericOperandParser.LESS_THAN_VALUE)).build())
                             .withChild(Builders.leafBuilder().withNodeIdentifier(AbstractFlowspecNlriParser.VALUE_NID).withValue(100).build()).build())
                         .build()).build()).build()).build());
 
         final FlowspecBuilder expectedFS = new FlowspecBuilder();
-        expectedFS.setFlowspecType(new PortCaseBuilder().setPorts(Lists.<Ports>newArrayList(new PortsBuilder().setValue(100).setOp(new NumericOperand(true, true, false, false, true)).build())).build());
+        expectedFS.setFlowspecType(new PortCaseBuilder().setPorts(Lists.newArrayList(new PortsBuilder().setValue(100).setOp(new NumericOperand(true, true, false, false, true)).build())).build());
         final List<Flowspec> expected = new ArrayList<>();
         expected.add(expectedFS.build());
         assertEquals(expected, FS_PARSER.extractFlowspec(entry.build()));
@@ -590,11 +590,11 @@ public class SimpleFlowspecIpv4NlriParserTest {
                     .withNodeIdentifier(AbstractFlowspecNlriParser.FLOWSPEC_TYPE_NID)
                     .withChild(Builders.unkeyedListBuilder().withNodeIdentifier(AbstractFlowspecNlriParser.DEST_PORT_NID)
                         .withChild(Builders.unkeyedListEntryBuilder().withNodeIdentifier(AbstractFlowspecNlriParser.OP_NID)
-                            .withChild(Builders.leafBuilder().withNodeIdentifier(AbstractFlowspecNlriParser.OP_NID).withValue(Sets.<String>newHashSet(AbstractOperandParser.END_OF_LIST_VALUE, AbstractNumericOperandParser.EQUALS_VALUE)).build())
+                            .withChild(Builders.leafBuilder().withNodeIdentifier(AbstractFlowspecNlriParser.OP_NID).withValue(Sets.newHashSet(AbstractOperandParser.END_OF_LIST_VALUE, AbstractNumericOperandParser.EQUALS_VALUE)).build())
                             .withChild(Builders.leafBuilder().withNodeIdentifier(AbstractFlowspecNlriParser.VALUE_NID).withValue(1024).build()).build())
                         .build()).build()).build()).build());
         final FlowspecBuilder expectedFS = new FlowspecBuilder();
-        expectedFS.setFlowspecType(new DestinationPortCaseBuilder().setDestinationPorts(Lists.<DestinationPorts>newArrayList(new DestinationPortsBuilder().setValue(1024).setOp(new NumericOperand(false, true, true, false, false)).build())).build());
+        expectedFS.setFlowspecType(new DestinationPortCaseBuilder().setDestinationPorts(Lists.newArrayList(new DestinationPortsBuilder().setValue(1024).setOp(new NumericOperand(false, true, true, false, false)).build())).build());
         final List<Flowspec> expected = new ArrayList<>();
         expected.add(expectedFS.build());
         assertEquals(expected, FS_PARSER.extractFlowspec(entry.build()));
@@ -612,11 +612,11 @@ public class SimpleFlowspecIpv4NlriParserTest {
                     .withNodeIdentifier(AbstractFlowspecNlriParser.FLOWSPEC_TYPE_NID)
                     .withChild(Builders.unkeyedListBuilder().withNodeIdentifier(AbstractFlowspecNlriParser.SOURCE_PORT_NID)
                         .withChild(Builders.unkeyedListEntryBuilder().withNodeIdentifier(AbstractFlowspecNlriParser.OP_NID)
-                            .withChild(Builders.leafBuilder().withNodeIdentifier(AbstractFlowspecNlriParser.OP_NID).withValue(Sets.<String>newHashSet(AbstractOperandParser.AND_BIT_VALUE, AbstractOperandParser.END_OF_LIST_VALUE, AbstractNumericOperandParser.EQUALS_VALUE, AbstractNumericOperandParser.GREATER_THAN_VALUE, AbstractNumericOperandParser.LESS_THAN_VALUE)).build())
+                            .withChild(Builders.leafBuilder().withNodeIdentifier(AbstractFlowspecNlriParser.OP_NID).withValue(Sets.newHashSet(AbstractOperandParser.AND_BIT_VALUE, AbstractOperandParser.END_OF_LIST_VALUE, AbstractNumericOperandParser.EQUALS_VALUE, AbstractNumericOperandParser.GREATER_THAN_VALUE, AbstractNumericOperandParser.LESS_THAN_VALUE)).build())
                             .withChild(Builders.leafBuilder().withNodeIdentifier(AbstractFlowspecNlriParser.VALUE_NID).withValue(8080).build()).build())
                         .build()).build()).build()).build());
         final FlowspecBuilder expectedFS = new FlowspecBuilder();
-        expectedFS.setFlowspecType(new SourcePortCaseBuilder().setSourcePorts(Lists.<SourcePorts>newArrayList(new SourcePortsBuilder().setValue(8080).setOp(new NumericOperand(true, true, true, true, true)).build())).build());
+        expectedFS.setFlowspecType(new SourcePortCaseBuilder().setSourcePorts(Lists.newArrayList(new SourcePortsBuilder().setValue(8080).setOp(new NumericOperand(true, true, true, true, true)).build())).build());
         final List<Flowspec> expected = new ArrayList<>();
         expected.add(expectedFS.build());
         assertEquals(expected, FS_PARSER.extractFlowspec(entry.build()));
@@ -634,11 +634,11 @@ public class SimpleFlowspecIpv4NlriParserTest {
                     .withNodeIdentifier(AbstractFlowspecNlriParser.FLOWSPEC_TYPE_NID)
                     .withChild(Builders.unkeyedListBuilder().withNodeIdentifier(AbstractFlowspecNlriParser.ICMP_TYPE_NID)
                         .withChild(Builders.unkeyedListEntryBuilder().withNodeIdentifier(AbstractFlowspecNlriParser.OP_NID)
-                            .withChild(Builders.leafBuilder().withNodeIdentifier(AbstractFlowspecNlriParser.OP_NID).withValue(Sets.<String>newHashSet(AbstractOperandParser.AND_BIT_VALUE, AbstractOperandParser.END_OF_LIST_VALUE, AbstractNumericOperandParser.EQUALS_VALUE, AbstractNumericOperandParser.GREATER_THAN_VALUE, AbstractNumericOperandParser.LESS_THAN_VALUE)).build())
+                            .withChild(Builders.leafBuilder().withNodeIdentifier(AbstractFlowspecNlriParser.OP_NID).withValue(Sets.newHashSet(AbstractOperandParser.AND_BIT_VALUE, AbstractOperandParser.END_OF_LIST_VALUE, AbstractNumericOperandParser.EQUALS_VALUE, AbstractNumericOperandParser.GREATER_THAN_VALUE, AbstractNumericOperandParser.LESS_THAN_VALUE)).build())
                             .withChild(Builders.leafBuilder().withNodeIdentifier(AbstractFlowspecNlriParser.VALUE_NID).withValue((short) 22).build()).build())
                         .build()).build()).build()).build());
         final FlowspecBuilder expectedFS = new FlowspecBuilder();
-        expectedFS.setFlowspecType(new IcmpTypeCaseBuilder().setTypes(Lists.<Types>newArrayList(new TypesBuilder().setValue((short) 22).setOp(new NumericOperand(true, true, true, true, true)).build())).build());
+        expectedFS.setFlowspecType(new IcmpTypeCaseBuilder().setTypes(Lists.newArrayList(new TypesBuilder().setValue((short) 22).setOp(new NumericOperand(true, true, true, true, true)).build())).build());
         final List<Flowspec> expected = new ArrayList<>();
         expected.add(expectedFS.build());
         assertEquals(expected, FS_PARSER.extractFlowspec(entry.build()));
@@ -660,7 +660,7 @@ public class SimpleFlowspecIpv4NlriParserTest {
                             .withChild(Builders.leafBuilder().withNodeIdentifier(AbstractFlowspecNlriParser.VALUE_NID).withValue((short) 23).build()).build())
                         .build()).build()).build()).build());
         final FlowspecBuilder expectedFS = new FlowspecBuilder();
-        expectedFS.setFlowspecType(new IcmpCodeCaseBuilder().setCodes(Lists.<Codes>newArrayList(new CodesBuilder().setValue((short) 23).setOp(new NumericOperand(false, false, false, false, false)).build())).build());
+        expectedFS.setFlowspecType(new IcmpCodeCaseBuilder().setCodes(Lists.newArrayList(new CodesBuilder().setValue((short) 23).setOp(new NumericOperand(false, false, false, false, false)).build())).build());
         final List<Flowspec> expected = new ArrayList<>();
         expected.add(expectedFS.build());
         assertEquals(expected, FS_PARSER.extractFlowspec(entry.build()));
@@ -678,11 +678,11 @@ public class SimpleFlowspecIpv4NlriParserTest {
                     .withNodeIdentifier(AbstractFlowspecNlriParser.FLOWSPEC_TYPE_NID)
                     .withChild(Builders.unkeyedListBuilder().withNodeIdentifier(AbstractFlowspecNlriParser.TCP_FLAGS_NID)
                         .withChild(Builders.unkeyedListEntryBuilder().withNodeIdentifier(AbstractFlowspecNlriParser.OP_NID)
-                            .withChild(Builders.leafBuilder().withNodeIdentifier(AbstractFlowspecNlriParser.OP_NID).withValue(Sets.<String>newHashSet(AbstractOperandParser.AND_BIT_VALUE, AbstractOperandParser.END_OF_LIST_VALUE)).build())
+                            .withChild(Builders.leafBuilder().withNodeIdentifier(AbstractFlowspecNlriParser.OP_NID).withValue(Sets.newHashSet(AbstractOperandParser.AND_BIT_VALUE, AbstractOperandParser.END_OF_LIST_VALUE)).build())
                             .withChild(Builders.leafBuilder().withNodeIdentifier(AbstractFlowspecNlriParser.VALUE_NID).withValue(99).build()).build())
                         .build()).build()).build()).build());
         final FlowspecBuilder expectedFS = new FlowspecBuilder();
-        expectedFS.setFlowspecType(new TcpFlagsCaseBuilder().setTcpFlags(Lists.<TcpFlags>newArrayList(new TcpFlagsBuilder().setValue(99).setOp(new BitmaskOperand(true, true, false, false)).build())).build());
+        expectedFS.setFlowspecType(new TcpFlagsCaseBuilder().setTcpFlags(Lists.newArrayList(new TcpFlagsBuilder().setValue(99).setOp(new BitmaskOperand(true, true, false, false)).build())).build());
         final List<Flowspec> expected = new ArrayList<>();
         expected.add(expectedFS.build());
         assertEquals(expected, FS_PARSER.extractFlowspec(entry.build()));
@@ -700,11 +700,11 @@ public class SimpleFlowspecIpv4NlriParserTest {
                     .withNodeIdentifier(AbstractFlowspecNlriParser.FLOWSPEC_TYPE_NID)
                     .withChild(Builders.unkeyedListBuilder().withNodeIdentifier(AbstractFlowspecNlriParser.PACKET_LENGTHS_NID)
                         .withChild(Builders.unkeyedListEntryBuilder().withNodeIdentifier(AbstractFlowspecNlriParser.OP_NID)
-                            .withChild(Builders.leafBuilder().withNodeIdentifier(AbstractFlowspecNlriParser.OP_NID).withValue(Sets.<String>newHashSet(AbstractOperandParser.AND_BIT_VALUE, AbstractNumericOperandParser.GREATER_THAN_VALUE)).build())
+                            .withChild(Builders.leafBuilder().withNodeIdentifier(AbstractFlowspecNlriParser.OP_NID).withValue(Sets.newHashSet(AbstractOperandParser.AND_BIT_VALUE, AbstractNumericOperandParser.GREATER_THAN_VALUE)).build())
                             .withChild(Builders.leafBuilder().withNodeIdentifier(AbstractFlowspecNlriParser.VALUE_NID).withValue(101).build()).build())
                         .build()).build()).build()).build());
         final FlowspecBuilder expectedFS = new FlowspecBuilder();
-        expectedFS.setFlowspecType(new PacketLengthCaseBuilder().setPacketLengths(Lists.<PacketLengths>newArrayList(new PacketLengthsBuilder().setValue(101).setOp(new NumericOperand(true, false, false, true, false)).build())).build());
+        expectedFS.setFlowspecType(new PacketLengthCaseBuilder().setPacketLengths(Lists.newArrayList(new PacketLengthsBuilder().setValue(101).setOp(new NumericOperand(true, false, false, true, false)).build())).build());
         final List<Flowspec> expected = new ArrayList<>();
         expected.add(expectedFS.build());
         assertEquals(expected, FS_PARSER.extractFlowspec(entry.build()));
@@ -722,11 +722,11 @@ public class SimpleFlowspecIpv4NlriParserTest {
                     .withNodeIdentifier(AbstractFlowspecNlriParser.FLOWSPEC_TYPE_NID)
                     .withChild(Builders.unkeyedListBuilder().withNodeIdentifier(AbstractFlowspecNlriParser.DSCP_NID)
                         .withChild(Builders.unkeyedListEntryBuilder().withNodeIdentifier(AbstractFlowspecNlriParser.OP_NID)
-                            .withChild(Builders.leafBuilder().withNodeIdentifier(AbstractFlowspecNlriParser.OP_NID).withValue(Sets.<String>newHashSet(AbstractOperandParser.AND_BIT_VALUE, AbstractOperandParser.END_OF_LIST_VALUE, AbstractNumericOperandParser.GREATER_THAN_VALUE)).build())
+                            .withChild(Builders.leafBuilder().withNodeIdentifier(AbstractFlowspecNlriParser.OP_NID).withValue(Sets.newHashSet(AbstractOperandParser.AND_BIT_VALUE, AbstractOperandParser.END_OF_LIST_VALUE, AbstractNumericOperandParser.GREATER_THAN_VALUE)).build())
                             .withChild(Builders.leafBuilder().withNodeIdentifier(AbstractFlowspecNlriParser.VALUE_NID).withValue((short) 15).build()).build())
                         .build()).build()).build()).build());
         final FlowspecBuilder expectedFS = new FlowspecBuilder();
-        expectedFS.setFlowspecType(new DscpCaseBuilder().setDscps(Lists.<Dscps>newArrayList(new DscpsBuilder().setValue(new Dscp((short) 15)).setOp(new NumericOperand(true, true, false, true, false)).build())).build());
+        expectedFS.setFlowspecType(new DscpCaseBuilder().setDscps(Lists.newArrayList(new DscpsBuilder().setValue(new Dscp((short) 15)).setOp(new NumericOperand(true, true, false, true, false)).build())).build());
         final List<Flowspec> expected = new ArrayList<>();
         expected.add(expectedFS.build());
         assertEquals(expected, FS_PARSER.extractFlowspec(entry.build()));
@@ -744,11 +744,11 @@ public class SimpleFlowspecIpv4NlriParserTest {
                     .withNodeIdentifier(AbstractFlowspecNlriParser.FLOWSPEC_TYPE_NID)
                     .withChild(Builders.unkeyedListBuilder().withNodeIdentifier(AbstractFlowspecNlriParser.FRAGMENT_NID)
                         .withChild(Builders.unkeyedListEntryBuilder().withNodeIdentifier(AbstractFlowspecNlriParser.OP_NID)
-                            .withChild(Builders.leafBuilder().withNodeIdentifier(AbstractFlowspecNlriParser.OP_NID).withValue(Sets.<String>newHashSet(AbstractOperandParser.AND_BIT_VALUE, AbstractOperandParser.END_OF_LIST_VALUE, BitmaskOperandParser.MATCH_VALUE, BitmaskOperandParser.NOT_VALUE)).build())
+                            .withChild(Builders.leafBuilder().withNodeIdentifier(AbstractFlowspecNlriParser.OP_NID).withValue(Sets.newHashSet(AbstractOperandParser.AND_BIT_VALUE, AbstractOperandParser.END_OF_LIST_VALUE, BitmaskOperandParser.MATCH_VALUE, BitmaskOperandParser.NOT_VALUE)).build())
                             .withChild(Builders.leafBuilder().withNodeIdentifier(AbstractFlowspecNlriParser.VALUE_NID).withValue(Sets.newHashSet(AbstractFlowspecNlriParser.DO_NOT_VALUE, AbstractFlowspecNlriParser.FIRST_VALUE, AbstractFlowspecNlriParser.IS_A_VALUE, AbstractFlowspecNlriParser.LAST_VALUE)).build()).build())
                         .build()).build()).build()).build());
         final FlowspecBuilder expectedFS = new FlowspecBuilder();
-        expectedFS.setFlowspecType(new FragmentCaseBuilder().setFragments(Lists.<Fragments>newArrayList(new FragmentsBuilder().setValue(new Fragment(true, true, true, true)).setOp(new BitmaskOperand(true, true, true, true)).build())).build());
+        expectedFS.setFlowspecType(new FragmentCaseBuilder().setFragments(Lists.newArrayList(new FragmentsBuilder().setValue(new Fragment(true, true, true, true)).setOp(new BitmaskOperand(true, true, true, true)).build())).build());
         final List<Flowspec> expected = new ArrayList<>();
         expected.add(expectedFS.build());
         assertEquals(expected, FS_PARSER.extractFlowspec(entry.build()));
index add3327ba8788dc2db3c4ecf8259ea078c4f4d9c..2234b0a27aca1d0d20e2a3faefb2defca41022cf 100644 (file)
@@ -329,11 +329,11 @@ public class SimpleFlowspecIpv6NlriParserTest {
                     .withNodeIdentifier(AbstractFlowspecNlriParser.FLOWSPEC_TYPE_NID)
                     .withChild(Builders.unkeyedListBuilder().withNodeIdentifier(AbstractFlowspecNlriParser.FRAGMENT_NID)
                         .withChild(Builders.unkeyedListEntryBuilder().withNodeIdentifier(AbstractFlowspecNlriParser.OP_NID)
-                            .withChild(Builders.leafBuilder().withNodeIdentifier(AbstractFlowspecNlriParser.OP_NID).withValue(Sets.<String>newHashSet(AbstractOperandParser.AND_BIT_VALUE, AbstractOperandParser.END_OF_LIST_VALUE, BitmaskOperandParser.MATCH_VALUE, BitmaskOperandParser.NOT_VALUE)).build())
+                            .withChild(Builders.leafBuilder().withNodeIdentifier(AbstractFlowspecNlriParser.OP_NID).withValue(Sets.newHashSet(AbstractOperandParser.AND_BIT_VALUE, AbstractOperandParser.END_OF_LIST_VALUE, BitmaskOperandParser.MATCH_VALUE, BitmaskOperandParser.NOT_VALUE)).build())
                             .withChild(Builders.leafBuilder().withNodeIdentifier(AbstractFlowspecNlriParser.VALUE_NID).withValue(Sets.newHashSet(AbstractFlowspecNlriParser.DO_NOT_VALUE, AbstractFlowspecNlriParser.FIRST_VALUE, AbstractFlowspecNlriParser.IS_A_VALUE, AbstractFlowspecNlriParser.LAST_VALUE)).build()).build())
                         .build()).build()).build()).build());
         final FlowspecBuilder expectedFS = new FlowspecBuilder();
-        expectedFS.setFlowspecType(new FragmentCaseBuilder().setFragments(Lists.<Fragments>newArrayList(new FragmentsBuilder().setValue(new Fragment(true, true, true, true)).setOp(new BitmaskOperand(true, true, true, true)).build())).build());
+        expectedFS.setFlowspecType(new FragmentCaseBuilder().setFragments(Lists.newArrayList(new FragmentsBuilder().setValue(new Fragment(true, true, true, true)).setOp(new BitmaskOperand(true, true, true, true)).build())).build());
         final List<Flowspec> expectedValue = new ArrayList<>();
         expectedValue.add(expectedFS.build());
         assertEquals(expectedValue, FS_PARSER.extractFlowspec(entry.build()));
@@ -351,18 +351,18 @@ public class SimpleFlowspecIpv6NlriParserTest {
                     .withNodeIdentifier(AbstractFlowspecNlriParser.FLOWSPEC_TYPE_NID)
                     .withChild(Builders.unkeyedListBuilder().withNodeIdentifier(NEXT_HEADER_NID)
                         .withChild(Builders.unkeyedListEntryBuilder().withNodeIdentifier(NEXT_HEADER_NID)
-                            .withChild(Builders.leafBuilder().withNodeIdentifier(AbstractFlowspecNlriParser.OP_NID).withValue(Sets.<String>newHashSet(AbstractOperandParser.END_OF_LIST_VALUE, AbstractOperandParser.AND_BIT_VALUE)).build())
+                            .withChild(Builders.leafBuilder().withNodeIdentifier(AbstractFlowspecNlriParser.OP_NID).withValue(Sets.newHashSet(AbstractOperandParser.END_OF_LIST_VALUE, AbstractOperandParser.AND_BIT_VALUE)).build())
                             .withChild(Builders.leafBuilder().withNodeIdentifier(AbstractFlowspecNlriParser.VALUE_NID).withValue((short) 100).build()).build())
                         .withChild(Builders.unkeyedListEntryBuilder().withNodeIdentifier(NEXT_HEADER_NID)
-                            .withChild(Builders.leafBuilder().withNodeIdentifier(AbstractFlowspecNlriParser.OP_NID).withValue(Sets.<String>newHashSet(AbstractOperandParser.AND_BIT_VALUE)).build())
+                            .withChild(Builders.leafBuilder().withNodeIdentifier(AbstractFlowspecNlriParser.OP_NID).withValue(Sets.newHashSet(AbstractOperandParser.AND_BIT_VALUE)).build())
                             .withChild(Builders.leafBuilder().withNodeIdentifier(AbstractFlowspecNlriParser.VALUE_NID).withValue((short) 200).build()).build())
                         .withChild(Builders.unkeyedListEntryBuilder().withNodeIdentifier(NEXT_HEADER_NID)
-                            .withChild(Builders.leafBuilder().withNodeIdentifier(AbstractFlowspecNlriParser.OP_NID).withValue(Sets.<String>newHashSet(AbstractOperandParser.END_OF_LIST_VALUE, AbstractOperandParser.AND_BIT_VALUE, AbstractNumericOperandParser.EQUALS_VALUE)).build())
+                            .withChild(Builders.leafBuilder().withNodeIdentifier(AbstractFlowspecNlriParser.OP_NID).withValue(Sets.newHashSet(AbstractOperandParser.END_OF_LIST_VALUE, AbstractOperandParser.AND_BIT_VALUE, AbstractNumericOperandParser.EQUALS_VALUE)).build())
                             .withChild(Builders.leafBuilder().withNodeIdentifier(AbstractFlowspecNlriParser.VALUE_NID).withValue((short) 210).build()).build())
                         .build()).build()).build()).build());
 
         final FlowspecBuilder expectedFS = new FlowspecBuilder();
-        expectedFS.setFlowspecType(new NextHeaderCaseBuilder().setNextHeaders(Lists.<NextHeaders>newArrayList(
+        expectedFS.setFlowspecType(new NextHeaderCaseBuilder().setNextHeaders(Lists.newArrayList(
             new NextHeadersBuilder().setValue((short) 100).setOp(new NumericOperand(true, true, false, false, false)).build(),
             new NextHeadersBuilder().setValue((short) 200).setOp(new NumericOperand(true, false, false, false, false)).build(),
             new NextHeadersBuilder().setValue((short) 210).setOp(new NumericOperand(true, true, true, false, false)).build())).build());
@@ -383,15 +383,15 @@ public class SimpleFlowspecIpv6NlriParserTest {
                     .withNodeIdentifier(AbstractFlowspecNlriParser.FLOWSPEC_TYPE_NID)
                     .withChild(Builders.unkeyedListBuilder().withNodeIdentifier(FLOW_LABEL_NID)
                         .withChild(Builders.unkeyedListEntryBuilder().withNodeIdentifier(FLOW_LABEL_NID)
-                            .withChild(Builders.leafBuilder().withNodeIdentifier(AbstractFlowspecNlriParser.OP_NID).withValue(Sets.<String>newHashSet(AbstractOperandParser.END_OF_LIST_VALUE, AbstractOperandParser.AND_BIT_VALUE)).build())
+                            .withChild(Builders.leafBuilder().withNodeIdentifier(AbstractFlowspecNlriParser.OP_NID).withValue(Sets.newHashSet(AbstractOperandParser.END_OF_LIST_VALUE, AbstractOperandParser.AND_BIT_VALUE)).build())
                             .withChild(Builders.leafBuilder().withNodeIdentifier(AbstractFlowspecNlriParser.VALUE_NID).withValue(100L).build()).build())
                         .withChild(Builders.unkeyedListEntryBuilder().withNodeIdentifier(FLOW_LABEL_NID)
-                            .withChild(Builders.leafBuilder().withNodeIdentifier(AbstractFlowspecNlriParser.OP_NID).withValue(Sets.<String>newHashSet(AbstractOperandParser.AND_BIT_VALUE)).build())
+                            .withChild(Builders.leafBuilder().withNodeIdentifier(AbstractFlowspecNlriParser.OP_NID).withValue(Sets.newHashSet(AbstractOperandParser.AND_BIT_VALUE)).build())
                             .withChild(Builders.leafBuilder().withNodeIdentifier(AbstractFlowspecNlriParser.VALUE_NID).withValue(200L).build()).build())
                         .build()).build()).build()).build());
 
         final FlowspecBuilder expectedFS = new FlowspecBuilder();
-        expectedFS.setFlowspecType(new FlowLabelCaseBuilder().setFlowLabel(Lists.<FlowLabel>newArrayList(
+        expectedFS.setFlowspecType(new FlowLabelCaseBuilder().setFlowLabel(Lists.newArrayList(
             new FlowLabelBuilder().setValue(100L).setOp(new NumericOperand(true, true, false, false, false)).build(),
             new FlowLabelBuilder().setValue(200L).setOp(new NumericOperand(true, false, false, false, false)).build())).build());
         final List<Flowspec> expectedValue = new ArrayList<>();
index b8c735593ca28ad435b5a3498c53f9b95144630d..6444ff61826fae0c7e6f175763e3a48e02f20301 100644 (file)
@@ -20,7 +20,7 @@ public final class RIBActivator extends AbstractRIBExtensionProviderActivator {
     @Override
     protected List<AutoCloseable> startRIBExtensionProviderImpl(final RIBExtensionProviderContext context) {
         return Lists.newArrayList(
-                (AutoCloseable)context.registerRIBSupport(Ipv4AddressFamily.class, UnicastSubsequentAddressFamily.class, IPv4RIBSupport.getInstance()),
-                (AutoCloseable)context.registerRIBSupport(Ipv6AddressFamily.class, UnicastSubsequentAddressFamily.class, IPv6RIBSupport.getInstance()));
+            context.registerRIBSupport(Ipv4AddressFamily.class, UnicastSubsequentAddressFamily.class, IPv4RIBSupport.getInstance()),
+            context.registerRIBSupport(Ipv6AddressFamily.class, UnicastSubsequentAddressFamily.class, IPv6RIBSupport.getInstance()));
     }
 }
index 056f6b2690c07ea2cea46f3c0722026809f0ea67..e2fe086a9aad8157ed232ea0c0ba0216c615514a 100644 (file)
@@ -200,7 +200,7 @@ public class BGPParserTest {
         paBuilder.addAugmentation(Attributes1.class, new Attributes1Builder().setMpReachNlri(mpBuilder.build()).build());
         assertEquals(paBuilder.getAugmentation(Attributes1.class).getMpReachNlri(),
                 attrs.getAugmentation(Attributes1.class).getMpReachNlri());
-        paBuilder.setUnrecognizedAttributes(Collections.<UnrecognizedAttributes> emptyList());
+        paBuilder.setUnrecognizedAttributes(Collections.emptyList());
         // check API message
 
         builder.setAttributes(paBuilder.build());
index 5ee5cfdcf711f58c4f744216d7752ed55669dedb..eec30d12980b9d85d6cf8cb9acdd2a8c12fb3619 100644 (file)
@@ -380,7 +380,7 @@ public class ParserTest {
         paBuilder.setOrigin(new OriginBuilder().setValue(BgpOrigin.Igp).build());
         assertEquals(paBuilder.getOrigin(), attrs.getOrigin());
 
-        paBuilder.setAsPath(new AsPathBuilder().setSegments(Collections.<Segments> emptyList()).build());
+        paBuilder.setAsPath(new AsPathBuilder().setSegments(Collections.emptyList()).build());
         assertEquals(paBuilder.getAsPath(), attrs.getAsPath());
 
         paBuilder.setLocalPref(new LocalPrefBuilder().setPref(100L).build());
@@ -407,7 +407,7 @@ public class ParserTest {
         paBuilder.addAugmentation(
             org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev150210.Attributes1.class,
             lsAttrBuilder.build());
-        paBuilder.setUnrecognizedAttributes(Collections.<UnrecognizedAttributes> emptyList());
+        paBuilder.setUnrecognizedAttributes(Collections.emptyList());
 
         assertEquals(
             lsAttrBuilder.build(),
@@ -571,14 +571,14 @@ public class ParserTest {
         paBuilder.setOrigin(new OriginBuilder().setValue(BgpOrigin.Igp).build());
         assertEquals(paBuilder.getOrigin(), attrs.getOrigin());
 
-        paBuilder.setAsPath(new AsPathBuilder().setSegments(Collections.<Segments> emptyList()).build());
+        paBuilder.setAsPath(new AsPathBuilder().setSegments(Collections.emptyList()).build());
         assertEquals(paBuilder.getAsPath(), attrs.getAsPath());
 
         paBuilder.setLocalPref(new LocalPrefBuilder().setPref(100L).build());
         assertEquals(paBuilder.getLocalPref(), attrs.getLocalPref());
 
         paBuilder.addAugmentation(Attributes1.class, lsBuilder.build());
-        paBuilder.setUnrecognizedAttributes(Collections.<UnrecognizedAttributes> emptyList());
+        paBuilder.setUnrecognizedAttributes(Collections.emptyList());
 
         final MpReachNlri mp = attrs.getAugmentation(Attributes1.class).getMpReachNlri();
         assertEquals(mpBuilder.getAfi(), mp.getAfi());
index 345f7cf61d5e0958b73a73ef6a190f05580b753e..9d6ade91adc01e94c33aa8e04914a08196743254 100644 (file)
@@ -125,7 +125,7 @@ public class SrAttributeParserTest {
     public void testSrAlgorithm() {
         final byte[] bytes = { 0 };
         final SrAlgorithm alg = new SrAlgorithmBuilder().setAlgorithms(Lists.newArrayList(Algorithm.ShortestPathFirst)).build();
-        final SrAlgorithm empty = new SrAlgorithmBuilder().setAlgorithms(Collections.<Algorithm>emptyList()).build();
+        final SrAlgorithm empty = new SrAlgorithmBuilder().setAlgorithms(Collections.emptyList()).build();
         assertEquals(alg, SrNodeAttributesParser.parseSrAlgorithms(Unpooled.wrappedBuffer(bytes)));
         final ByteBuf b = Unpooled.buffer();
         assertEquals(empty, SrNodeAttributesParser.parseSrAlgorithms(b));
index b5383148059861046544be1b9929292bd5b585bc..c93c0f7e361cbd1c8a1af4595eeab12dd70c12c8 100644 (file)
@@ -39,7 +39,7 @@ public final class AsPathAttributeParser implements AttributeParser, AttributeSe
     private final ReferenceCache refCache;
     private static final Logger LOG = LoggerFactory.getLogger(AsPathAttributeParser.class);
 
-    private static final AsPath EMPTY = new AsPathBuilder().setSegments(Collections.<Segments> emptyList()).build();
+    private static final AsPath EMPTY = new AsPathBuilder().setSegments(Collections.emptyList()).build();
 
     public AsPathAttributeParser(final ReferenceCache refCache) {
         this.refCache = Preconditions.checkNotNull(refCache);
index 56dee6130effa81711729c950d721ec0577bc837..dad4ebfd5b6034a0cf9687389a038b8dcfd0e0d0 100644 (file)
@@ -64,7 +64,7 @@ public final class AsPathSegmentParser {
         for (int i = 0; i < count; i++) {
             coll.add(refCache.getSharedReference(new AsNumber(buffer.readUnsignedInt())));
         }
-        return (coll.isEmpty()) ? Collections.<AsNumber>emptyList() : coll;
+        return (coll.isEmpty()) ? Collections.emptyList() : coll;
     }
 
     static void serializeAsList(final List<AsNumber> asList, final SegmentType type, final ByteBuf byteAggregator) {
index 5170e990194f74bd039eea571b0dbda8c3ea2820..8dcb718d4b65b6c85ddc9202e3bdfd5eb47d7947 100644 (file)
@@ -215,7 +215,7 @@ public class BGPParserTest {
         paBuilder.setCommunities(comms);
         assertEquals(paBuilder.getCommunities(), attrs.getCommunities());
 
-        paBuilder.setUnrecognizedAttributes(Collections.<UnrecognizedAttributes> emptyList());
+        paBuilder.setUnrecognizedAttributes(Collections.emptyList());
 
         builder.setAttributes(paBuilder.build());
 
@@ -315,7 +315,7 @@ public class BGPParserTest {
 
         paBuilder.setAggregator(aggregator);
         assertEquals(paBuilder.getAggregator(), attrs.getAggregator());
-        paBuilder.setUnrecognizedAttributes(Collections.<UnrecognizedAttributes> emptyList());
+        paBuilder.setUnrecognizedAttributes(Collections.emptyList());
         builder.setAttributes(paBuilder.build());
 
         assertEquals(builder.build(), message);
@@ -402,7 +402,7 @@ public class BGPParserTest {
         paBuilder.setOrigin(new OriginBuilder().setValue(BgpOrigin.Egp).build());
         assertEquals(paBuilder.getOrigin(), attrs.getOrigin());
 
-        paBuilder.setAsPath(new AsPathBuilder().setSegments(Collections.<Segments> emptyList()).build());
+        paBuilder.setAsPath(new AsPathBuilder().setSegments(Collections.emptyList()).build());
         assertEquals(paBuilder.getAsPath(), attrs.getAsPath());
 
         paBuilder.setCNextHop(nextHop);
@@ -417,7 +417,7 @@ public class BGPParserTest {
         paBuilder.setExtendedCommunities(comms);
         assertEquals(paBuilder.getExtendedCommunities(), attrs.getExtendedCommunities());
 
-        paBuilder.setUnrecognizedAttributes(Collections.<UnrecognizedAttributes> emptyList());
+        paBuilder.setUnrecognizedAttributes(Collections.emptyList());
         // check API message
         builder.setAttributes(paBuilder.build());
         assertEquals(builder.build(), message);
index 4d80a3821740f05693659aa66d235365b9a16344..03c2763139ab27943a15e6633a5a95a2e7f4da4d 100644 (file)
@@ -101,7 +101,7 @@ public class GracefulCapabilityHandlerTest {
         };
         capaBuilder.setRestartFlags(new RestartFlags(false));
         capaBuilder.setRestartTime(0);
-        capaBuilder.setTables(Collections.<Tables>emptyList());
+        capaBuilder.setTables(Collections.emptyList());
         Assert.assertEquals( new CParametersBuilder().addAugmentation(CParameters1.class,
             new CParameters1Builder().setGracefulRestartCapability(capaBuilder.build()).build()).build(),
             handler.parseCapability(Unpooled.wrappedBuffer(capaBytes3).slice(2, capaBytes3.length - 2)));
@@ -123,7 +123,7 @@ public class GracefulCapabilityHandlerTest {
         Assert.assertArrayEquals(capaBytes5, b.array());
         Assert.assertEquals(new CParametersBuilder().addAugmentation(CParameters1.class, new CParameters1Builder()
             .setGracefulRestartCapability(new GracefulRestartCapabilityBuilder().setRestartFlags(new RestartFlags(Boolean.FALSE))
-                .setRestartTime(0).setTables(Collections.<Tables>emptyList()).build()).build()).build(),
+                .setRestartTime(0).setTables(Collections.emptyList()).build()).build()).build(),
             handler.parseCapability(Unpooled.wrappedBuffer(capaBytes5).slice(2, capaBytes5.length - 2)));
     }
 
index 35f861d81aadc1c0d6f2f5b93ced7af358d2eef0..e1016101b767957be381d7a39000ab9e55270be1 100755 (executable)
@@ -39,7 +39,7 @@ public class UnrecognizedAttributesSerializerTest {
         final Attributes attrs = new AttributesBuilder().setUnrecognizedAttributes(unrecognizedAttrs).build();
 
         final ByteBuf buffer = Unpooled.buffer();
-        ServiceLoaderBGPExtensionProviderContext.getSingletonInstance().getAttributeRegistry().serializeAttribute((DataObject) attrs, buffer);
+        ServiceLoaderBGPExtensionProviderContext.getSingletonInstance().getAttributeRegistry().serializeAttribute(attrs, buffer);
         assertArrayEquals(unrecognizedBytes, ByteArray.readAllBytes(buffer));
     }
 }
index 604bb4bf5bcc252066f459bb261d87c73196cb47..bf04708df83c0a356f62827e390ae9fcf2fba078 100644 (file)
@@ -57,19 +57,19 @@ public final class BestPathStateImpl implements BestPathState {
         NamespaceSpecificIds(final QName namespace) {
             NodeIdentifier container = new NodeIdentifier(QName.create(namespace, AsPath.QNAME.getLocalName().intern()));
             NodeIdentifier leaf = new NodeIdentifier(QName.create(namespace, "segments").intern());
-            this.asPath = ImmutableList.<PathArgument>of(container, leaf);
+            this.asPath = ImmutableList.of(container, leaf);
 
             container = new NodeIdentifier(QName.create(namespace, LocalPref.QNAME.getLocalName()).intern());
             leaf = new NodeIdentifier(QName.create(namespace, "pref").intern());
-            this.locPref = ImmutableList.<PathArgument>of(container, leaf);
+            this.locPref = ImmutableList.of(container, leaf);
 
             container = new NodeIdentifier(QName.create(namespace, MultiExitDisc.QNAME.getLocalName()).intern());
             leaf = new NodeIdentifier(QName.create(namespace, "med").intern());
-            this.med = ImmutableList.<PathArgument>of(container, leaf);
+            this.med = ImmutableList.of(container, leaf);
 
             container = new NodeIdentifier(QName.create(namespace, Origin.QNAME.getLocalName()).intern());
             leaf = new NodeIdentifier(QName.create(namespace, "value").intern());
-            this.orig = ImmutableList.<PathArgument>of(container, leaf);
+            this.orig = ImmutableList.of(container, leaf);
 
             this.asSetNid = new NodeIdentifier(QName.create(namespace, "as-set").intern());
             this.asSeqNid = new NodeIdentifier(QName.create(namespace, "as-sequence").intern());
@@ -152,21 +152,21 @@ public final class BestPathStateImpl implements BestPathState {
 
         final Optional<NormalizedNode<?, ?>> maybeLocalPref = NormalizedNodes.findNode(this.attributes, this.ids.getLocPref());
         if (maybeLocalPref.isPresent()) {
-            this.localPref = (Long) ((LeafNode<?>)maybeLocalPref.get()).getValue();
+            this.localPref = (Long) maybeLocalPref.get().getValue();
         } else {
             this.localPref = null;
         }
 
         final Optional<NormalizedNode<?, ?>> maybeMultiExitDisc = NormalizedNodes.findNode(this.attributes, this.ids.getMed());
         if (maybeMultiExitDisc.isPresent()) {
-            this.multiExitDisc = (Long) ((LeafNode<?>)maybeMultiExitDisc.get()).getValue();
+            this.multiExitDisc = (Long) maybeMultiExitDisc.get().getValue();
         } else {
             this.multiExitDisc = null;
         }
 
         final Optional<NormalizedNode<?, ?>> maybeOrigin = NormalizedNodes.findNode(this.attributes, this.ids.getOrig());
         if (maybeOrigin.isPresent()) {
-            this.origin = fromString((String) ((LeafNode<?>)maybeOrigin.get()).getValue());
+            this.origin = fromString((String) maybeOrigin.get().getValue());
         } else {
             this.origin = null;
         }
index 2664ca8e9a9d64d3eb3d55f5f56d45ae40aec5c8..84e2546e546fa28ce0dcda5c844e3c206d439b85 100644 (file)
@@ -24,7 +24,7 @@ import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
 import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNodes;
 
 public class AbstractBestPathSelector {
-    private static final Collection<YangInstanceIdentifier.PathArgument> ORIGINATOR_ID = ImmutableList.<YangInstanceIdentifier.PathArgument>of(new
+    private static final Collection<YangInstanceIdentifier.PathArgument> ORIGINATOR_ID = ImmutableList.of(new
         YangInstanceIdentifier.NodeIdentifier(OriginatorId.QNAME), new YangInstanceIdentifier.NodeIdentifier(QName.create(OriginatorId.QNAME, "originator")));
 
     private final Long ourAs;
index fff71369cb89e4c2a4cd12701d5ce8288f54019f..7edaa8903cfef1eb22c65ae7acd81ea8c94c93b4 100644 (file)
@@ -141,18 +141,18 @@ final class AdjRibOutListener implements ClusteredDOMDataTreeChangeListener, Pre
     private Update withdraw(final MapEntryNode route) {
         this.routeCounter.decrement();
         if (!this.mpSupport) {
-            return buildUpdate(Collections.<MapEntryNode>emptyList(), Collections.singleton(route), routeAttributes(route));
+            return buildUpdate(Collections.emptyList(), Collections.singleton(route), routeAttributes(route));
         }
-        return this.support.buildUpdate(Collections.<MapEntryNode>emptyList(), Collections.singleton(route), routeAttributes(route));
+        return this.support.buildUpdate(Collections.emptyList(), Collections.singleton(route), routeAttributes(route));
     }
 
     private Update advertise(final MapEntryNode route) {
         this.routeCounter.increment();
         this.prefixesSentCounter.increment();
         if (!this.mpSupport) {
-            return buildUpdate(Collections.singleton(route), Collections.<MapEntryNode>emptyList(), routeAttributes(route));
+            return buildUpdate(Collections.singleton(route), Collections.emptyList(), routeAttributes(route));
         }
-        return this.support.buildUpdate(Collections.singleton(route), Collections.<MapEntryNode>emptyList(), routeAttributes(route));
+        return this.support.buildUpdate(Collections.singleton(route), Collections.emptyList(), routeAttributes(route));
     }
 
     private Update buildUpdate(@Nonnull final Collection<MapEntryNode> advertised, @Nonnull final Collection<MapEntryNode> withdrawn, @Nonnull final Attributes attr) {
index 62832936ce5620fa518a2093d2dd9ef80b334d90..6dbb82a773a575a0f5ab4ebd08fb249dd29037bf 100644 (file)
@@ -98,10 +98,10 @@ final class AttributeOperations {
         this.clusterListContainer = new NodeIdentifier(QName.create(namespace, ClusterId.QNAME.getLocalName()).intern());
         this.clusterQname = QName.create(namespace, "cluster").intern();
         this.clusterListLeaf = new NodeIdentifier(this.clusterQname);
-        this.clusterListPath = ImmutableList.<PathArgument>of(this.clusterListContainer, this.clusterListLeaf);
+        this.clusterListPath = ImmutableList.of(this.clusterListContainer, this.clusterListLeaf);
         this.originatorIdContainer = new NodeIdentifier(QName.create(namespace, OriginatorId.QNAME.getLocalName()).intern());
         this.originatorIdLeaf = new NodeIdentifier(QName.create(namespace, "originator").intern());
-        this.originatorIdPath = ImmutableList.<PathArgument>of(this.originatorIdContainer, this.originatorIdLeaf);
+        this.originatorIdPath = ImmutableList.of(this.originatorIdContainer, this.originatorIdLeaf);
 
         this.transitiveLeaf = new NodeIdentifier(QName.create(UnrecognizedAttributes.QNAME, "transitive").intern());
         this.transitiveCollection = TRANSITIVE_CACHE.getUnchecked(namespace);
@@ -334,7 +334,7 @@ final class AttributeOperations {
 
         final NormalizedNode<?, ?> originatorId = maybeOriginatorId.get();
         if (originatorId instanceof LeafNode) {
-            return ((LeafNode<?>) originatorId).getValue();
+            return originatorId.getValue();
         }
 
         LOG.warn("Unexpected ORIGINATOR_ID node {}, ignoring it", originatorId);
index 6d81483576c2e347f63d2f06e1eea5098b5a9848..04cec26c2ee51b604d2d7c8218b28ac03a276e3a 100644 (file)
@@ -192,7 +192,7 @@ public class BGPSessionImpl extends SimpleChannelInboundHandler<Notification> im
             }, this.keepAlive, TimeUnit.SECONDS);
         }
         this.bgpId = remoteOpen.getBgpIdentifier();
-        this.sessionStats = new BGPSessionStatsImpl(this, remoteOpen, this.holdTimerValue, this.keepAlive, channel, Optional.<BGPSessionPreferences>absent(),
+        this.sessionStats = new BGPSessionStatsImpl(this, remoteOpen, this.holdTimerValue, this.keepAlive, channel, Optional.absent(),
                 this.tableTypes, this.addPathTypes);
 
         this.sessionState.advertizeCapabilities(this.holdTimerValue, channel.remoteAddress(), channel.localAddress(),
index 0b82eb12e5ef3e66c1ba9a6a3ea39972b9603b03..d283fe6d9715ad0a1ac96f1eb74ac00bd5e4e87d 100755 (executable)
@@ -128,7 +128,7 @@ public class BGPPeerModuleTest extends AbstractRIBImplModuleTest {
         mxBean.setPeerRegistry(createPeerRegistry(transaction));
         mxBean.setHost(host);
         mxBean.setPort(port);
-        mxBean.setAdvertizedTable(Collections.<ObjectName>emptyList());
+        mxBean.setAdvertizedTable(Collections.emptyList());
         mxBean.setRouteRefresh(false);
         {
             final ObjectName ribON = createRIBImplModuleInstance(transaction);
index 8ad8d9e38bd75c84a2a63d3ca41fc11371d541cc..6597ee98939962ade1934c986ae1a5e18f2af927 100644 (file)
@@ -115,7 +115,7 @@ public class BGPSessionImplTest {
         tlvs.add(new BgpParametersBuilder().setOptionalCapabilities(capa).build());
 
         final ChannelFuture f = mock(ChannelFuture.class);
-        doReturn(null).when(f).addListener(Mockito.<GenericFutureListener<? extends Future<? super Void>>>any());
+        doReturn(null).when(f).addListener(Mockito.any());
 
         doAnswer(new Answer<Object>() {
             @Override
@@ -146,7 +146,7 @@ public class BGPSessionImplTest {
         doReturn(null).when(this.pipeline).replace(Matchers.<Class<ChannelHandler>>any(), Mockito.any(String.class), Mockito.any(ChannelHandler.class));
         doReturn(this.pipeline).when(this.pipeline).addLast(Mockito.any(ChannelHandler.class));
         final ChannelFuture futureChannel = mock(ChannelFuture.class);
-        doReturn(null).when(futureChannel).addListener(Mockito.<GenericFutureListener<? extends Future<? super Void>>>any());
+        doReturn(null).when(futureChannel).addListener(Mockito.any());
         doReturn(futureChannel).when(this.speakerListener).close();
         this.listener = new SimpleSessionListener();
         this.bgpSession = new BGPSessionImpl(this.listener, this.speakerListener, this.classicOpen, this.classicOpen.getHoldTimer(), null);
index c5bb5576dc55214bb95c54173ce1131a3c1a1e16..4e90b99b234b6107d5bcc20cdff464a6f729dcbe 100644 (file)
@@ -113,7 +113,7 @@ public class FSMTest {
 
         tlvs.add(new BgpParametersBuilder().setOptionalCapabilities(capas).build());
         final BGPSessionPreferences prefs = new BGPSessionPreferences(new AsNumber(30L), (short) 3, new BgpId("1.1.1.1"), new AsNumber(30L), tlvs,
-                Optional.<byte[]>absent());
+                Optional.absent());
 
         final ChannelFuture f = mock(ChannelFuture.class);
         doReturn(null).when(f).addListener(any(GenericFutureListener.class));
index 905c802e895e31d63def00d31130cebb9583a81c..154b79770fbf27204d75f9e0ded1c71a4ce0a598 100644 (file)
@@ -61,8 +61,8 @@ public class StrictBGPPeerRegistryTest {
     @Before
     public void setUp() throws Exception {
         this.peerRegistry = new StrictBGPPeerRegistry();
-        this.mockPreferences =  new BGPSessionPreferences(LOCAL_AS, 1, new BgpId("0.0.0.1"), LOCAL_AS, Collections.<BgpParameters> emptyList(),
-                Optional.<byte[]>absent());
+        this.mockPreferences =  new BGPSessionPreferences(LOCAL_AS, 1, new BgpId("0.0.0.1"), LOCAL_AS, Collections.emptyList(),
+                Optional.absent());
     }
 
     private static BGPSessionListener getMockSession() {
index 51dbeb111b50761a3e63369e2419a7f24c040b17..65947123305b1538b2fee05e2a97ec976b31ef5f 100644 (file)
@@ -50,7 +50,7 @@ public final class RibSupportUtils {
      * @return NodeIdentifierWithPredicates of 'id' for specified AFI, SAFI combination.
      */
     public static NodeIdentifierWithPredicates toYangKey(final QName id, final Class<? extends AddressFamily> afi, final Class<? extends SubsequentAddressFamily> safi) {
-        final ImmutableMap<QName, Object> keyValues = ImmutableMap.<QName, Object>of(
+        final ImmutableMap<QName, Object> keyValues = ImmutableMap.of(
                         AFI_QNAME, BindingReflections.findQName(afi),
                         SAFI_QNAME, BindingReflections.findQName(safi));
         return new NodeIdentifierWithPredicates(id, keyValues);
@@ -67,7 +67,7 @@ public final class RibSupportUtils {
      */
     public static NodeIdentifierWithPredicates toYangPathKey(final QName id, final Class<? extends AddressFamily> afi,
         final Class<? extends SubsequentAddressFamily> safi) {
-        final ImmutableMap<QName, Object> keyValues = ImmutableMap.<QName, Object>of(
+        final ImmutableMap<QName, Object> keyValues = ImmutableMap.of(
             ADD_PATH_AFI_QNAME, BindingReflections.findQName(afi),
             ADD_PATH_SAFI_QNAME, BindingReflections.findQName(safi));
         return new NodeIdentifierWithPredicates(id, keyValues);
index 111f48ca82b86b2091c21cafd053b7bea53297ee..b10fdce9814caa08edbb0ff63fd869d2ee3b93cd 100644 (file)
@@ -115,7 +115,7 @@ abstract class AbstractReachabilityTopologyBuilder<T extends Route> extends Abst
 
         trans.merge(LogicalDatastoreType.OPERATIONAL, nii, new NodeBuilder().setKey(nii.getKey()).setNodeId(ni)
             .addAugmentation(Node1.class, new Node1Builder().setIgpNodeAttributes(
-                new IgpNodeAttributesBuilder().setPrefix(Collections.<Prefix>emptyList()).build()).build()).build());
+                new IgpNodeAttributesBuilder().setPrefix(Collections.emptyList()).build()).build()).build());
 
         this.nodes.put(ni, new NodeUsage(ret));
         return ret;
index de1070ab8344a34c251a9c5103d62bccc8f8bbab..1a7aaa821ff960b6dbd70abb2bba8b8967419c7d 100644 (file)
@@ -233,7 +233,7 @@ public abstract class AbstractTopologyBuilder<T extends Route> implements AutoCl
         final WriteTransaction trans = this.chain.newWriteOnlyTransaction();
         trans.put(LogicalDatastoreType.OPERATIONAL, this.topology,
             new TopologyBuilder().setKey(this.topologyKey).setServerProvided(Boolean.TRUE).setTopologyTypes(this.topologyTypes)
-                                 .setLink(Collections.<Link>emptyList()).setNode(Collections.<Node>emptyList()).build(), true);
+                                 .setLink(Collections.emptyList()).setNode(Collections.emptyList()).build(), true);
         Futures.addCallback(trans.submit(), new FutureCallback<Void>() {
             @Override
             public void onSuccess(final Void result) {
index 9700e25182f575cb99046cdf2ff4ef843c403ca8..3132da92973ae79ca37584c855b0c3f809677309 100644 (file)
@@ -44,7 +44,7 @@ public abstract class AbstractTopologyBuilderTest extends AbstractDataBrokerTest
 
     protected void createEmptyTopology() {
         final WriteTransaction wTx = getDataBroker().newWriteOnlyTransaction();
-        wTx.put(LogicalDatastoreType.OPERATIONAL, InstanceIdentifier.builder(NetworkTopology.class).build(), new NetworkTopologyBuilder().setTopology(Collections.<Topology>emptyList()).build());
+        wTx.put(LogicalDatastoreType.OPERATIONAL, InstanceIdentifier.builder(NetworkTopology.class).build(), new NetworkTopologyBuilder().setTopology(Collections.emptyList()).build());
         wTx.submit();
     }
 
index f3ef364ab5187f580a0aec2c8c3519cb1204997f..b166bfc6a64a94ab2c16aa9ac98b0933f6c11798 100644 (file)
@@ -63,9 +63,9 @@ public class DataChangeCounterImplModuleTest extends AbstractConfigTest {
     public void setUp() throws Exception {
         Mockito.doNothing().when(this.registration).close();
         Mockito.doReturn(null).when(this.wTx).submit();
-        Mockito.doNothing().when(this.wTx).put(Mockito.any(LogicalDatastoreType.class), Mockito.<InstanceIdentifier<DataChangeCounter>>any(), Mockito.any(DataChangeCounter.class));
+        Mockito.doNothing().when(this.wTx).put(Mockito.any(LogicalDatastoreType.class), Mockito.any(), Mockito.any(DataChangeCounter.class));
         Mockito.doReturn(this.registration).when(this.dataBroker).registerDataTreeChangeListener(Mockito.any(DataTreeIdentifier.class), Mockito.any(ClusteredDataTreeChangeListener.class));
-        Mockito.doNothing().when(this.wTx).delete(Mockito.any(LogicalDatastoreType.class), Mockito.<InstanceIdentifier<?>>any());
+        Mockito.doNothing().when(this.wTx).delete(Mockito.any(LogicalDatastoreType.class), Mockito.any());
         Mockito.doReturn(this.chain).when(this.dataBroker).createTransactionChain(Mockito.any(TransactionChainListener.class));
         Mockito.doReturn(this.wTx).when(this.chain).newWriteOnlyTransaction();
         Mockito.doReturn(this.wTx).when(this.dataBroker).newWriteOnlyTransaction();
index 214788b726b1fe4068442cfe3ad6f42df436b850..3a9ff27b38ea56af172ece359e7de8ca059dc2d9 100644 (file)
@@ -231,11 +231,11 @@ public class PcepRpcServicesRoutingTest extends AbstractPcepOsgiTest {
         final ListenableFuture future = Futures.immediateFuture(RpcResultBuilder.<AddLspOutput>success().build());
         final ListenableFuture futureSyncTrigger = Futures.immediateFuture(RpcResultBuilder.<TriggerSyncOutput>success().build());
 
-        when(pcepService.addLsp(Mockito.<AddLspInput>any())).thenReturn(future);
-        when(pcepService.removeLsp(Mockito.<RemoveLspInput>any())).thenReturn(future);
-        when(pcepService.triggerSync(Mockito.<TriggerSyncInput>any())).thenReturn(futureSyncTrigger);
-        when(pcepService.ensureLspOperational(Mockito.<EnsureLspOperationalInput>any())).thenReturn(future);
-        when(pcepService.updateLsp(Mockito.<UpdateLspInput>any())).thenReturn(future);
+        when(pcepService.addLsp(Mockito.any())).thenReturn(future);
+        when(pcepService.removeLsp(Mockito.any())).thenReturn(future);
+        when(pcepService.triggerSync(Mockito.any())).thenReturn(futureSyncTrigger);
+        when(pcepService.ensureLspOperational(Mockito.any())).thenReturn(future);
+        when(pcepService.updateLsp(Mockito.any())).thenReturn(future);
 
     }
 
@@ -353,11 +353,11 @@ public class PcepRpcServicesRoutingTest extends AbstractPcepOsgiTest {
         @SuppressWarnings("rawtypes")
         final ListenableFuture future = Futures.immediateFuture(RpcResultBuilder.<AddLspOutput>success().build());
         final ListenableFuture futureTriggerSync = Futures.immediateFuture(RpcResultBuilder.<TriggerSyncOutput>success().build());
-        when(pcepService.submitAddLsp(Mockito.<SubmitAddLspInput>any())).thenReturn(future);
-        when(pcepService.submitRemoveLsp(Mockito.<SubmitRemoveLspInput>any())).thenReturn(future);
-        when(pcepService.submitTriggerSync(Mockito.<SubmitTriggerSyncInput>any())).thenReturn(futureTriggerSync);
-        when(pcepService.submitEnsureLspOperational(Mockito.<SubmitEnsureLspOperationalInput>any())).thenReturn(future);
-        when(pcepService.submitUpdateLsp(Mockito.<SubmitUpdateLspInput>any())).thenReturn(future);
+        when(pcepService.submitAddLsp(Mockito.any())).thenReturn(future);
+        when(pcepService.submitRemoveLsp(Mockito.any())).thenReturn(future);
+        when(pcepService.submitTriggerSync(Mockito.any())).thenReturn(futureTriggerSync);
+        when(pcepService.submitEnsureLspOperational(Mockito.any())).thenReturn(future);
+        when(pcepService.submitUpdateLsp(Mockito.any())).thenReturn(future);
     }
 
     @Test
@@ -454,9 +454,9 @@ public class PcepRpcServicesRoutingTest extends AbstractPcepOsgiTest {
     private void initMock(final TopologyTunnelPcepProgrammingService pcepService) {
         @SuppressWarnings("rawtypes")
         final ListenableFuture future = Futures.immediateFuture(RpcResultBuilder.<AddLspOutput>success().build());
-        when(pcepService.pcepCreateP2pTunnel(Mockito.<PcepCreateP2pTunnelInput>any())).thenReturn(future);
-        when(pcepService.pcepDestroyTunnel(Mockito.<PcepDestroyTunnelInput>any())).thenReturn(future);
-        when(pcepService.pcepUpdateTunnel(Mockito.<PcepUpdateTunnelInput>any())).thenReturn(future);
+        when(pcepService.pcepCreateP2pTunnel(Mockito.any())).thenReturn(future);
+        when(pcepService.pcepDestroyTunnel(Mockito.any())).thenReturn(future);
+        when(pcepService.pcepUpdateTunnel(Mockito.any())).thenReturn(future);
     }
 
 }
index cc56bf1ad777ec6346bf640b3d4175fda084fd8b..7b6985ea00a699900c255a7de92a59b2d41bed5e 100644 (file)
@@ -91,8 +91,8 @@ public class PcRptMessageCodecTest {
         final LspIdentifiers identifier = new LspIdentifiersBuilder().setAddressFamily(afiLsp).setLspId(lspId).setTunnelId(tunnelId).build();
         final Lsp lsp = new LspBuilder().setPlspId(new PlspId(1L)).setTlvs(new TlvsBuilder().setLspIdentifiers(identifier).build()).build();
         final Ero ero = new EroBuilder().build();
-        final List<Object> objects = Lists.<Object>newArrayList(lsp, ero, bw);
-        final Reports validReports = codec.getValidReports(objects, Collections.<Message>emptyList());
+        final List<Object> objects = Lists.newArrayList(lsp, ero, bw);
+        final Reports validReports = codec.getValidReports(objects, Collections.emptyList());
         assertNotNull(validReports.getPath().getBandwidth().getAugmentation(Bandwidth1.class));
         assertTrue(objects.isEmpty());
     }
@@ -126,7 +126,7 @@ public class PcRptMessageCodecTest {
     @Test
     public void testReportMsgWithRro() throws PCEPDeserializerException {
         final byte[] parseHexBinary = DatatypeConverter.parseHexBinary("2010003c0084a019001100106e79636e7932316372735f7432313231001200100a0000d2004008490a0000d40a0000d4001f0006000005dd700000000710001401080a000706200001080a0000d420000910001400000000000000000000000005050100051000084998968005500008513a43b70810002401080a0000d42020030801010000000001080a00070620000308010100000000");
-        final Pcrpt msg = (Pcrpt) this.ctx.getMessageHandlerRegistry().parseMessage(10, Unpooled.wrappedBuffer(parseHexBinary), Collections.<Message>emptyList());
+        final Pcrpt msg = (Pcrpt) this.ctx.getMessageHandlerRegistry().parseMessage(10, Unpooled.wrappedBuffer(parseHexBinary), Collections.emptyList());
         Assert.assertNotNull(msg.getPcrptMessage().getReports().get(0).getPath().getBandwidth().getAugmentation(Bandwidth1.class));
     }
 
index 64d000d216affa80ea5d85d762e692320b4209d2..a2404346e54309ce1b5a2ced23f6a12400cb4792 100644 (file)
@@ -98,7 +98,7 @@ public class PCEPErrorMessageParser extends AbstractMessageParser {
         } else if (obj instanceof Rp) {
             final Rp o = (Rp) obj;
             if (o.isProcessingRule()) {
-                errors.add(createErrorMsg(PCEPErrors.P_FLAG_NOT_SET, Optional.<Rp>absent()));
+                errors.add(createErrorMsg(PCEPErrors.P_FLAG_NOT_SET, Optional.absent()));
                 return null;
             }
             requestParameters.add(new RpsBuilder().setRp(o).build());
index 4fafc27ca3c4f8aa7e9ed4c1f8b7743896c64cca..81e4def6db6f54e5a24436d6777c53369fa42370 100644 (file)
@@ -96,7 +96,7 @@ public class PCEPMonitoringReplyMessageParser extends AbstractMessageParser {
             throw new PCEPDeserializerException("Pcmonrep message cannot be empty.");
         }
         if (!(objects.get(0) instanceof Monitoring)) {
-            errors.add(createErrorMsg(PCEPErrors.MONITORING_OBJECT_MISSING, Optional.<Rp>absent()));
+            errors.add(createErrorMsg(PCEPErrors.MONITORING_OBJECT_MISSING, Optional.absent()));
             return null;
         }
         final PcmonrepMessageBuilder builder = new PcmonrepMessageBuilder();
index dc11799a8c46ef21d821aa3532503f8dbfc3bdfe..80a3dd460f2beb993225c806a3e252d75eb19e2a 100644 (file)
@@ -64,7 +64,7 @@ public class PCEPMonitoringRequestMessageParser extends PCEPRequestMessageParser
         }
         final MonitoringRequest monReq = getMonitoring(objects);
         if (monReq == null) {
-            errors.add(createErrorMsg(PCEPErrors.MONITORING_OBJECT_MISSING, Optional.<Rp>absent()));
+            errors.add(createErrorMsg(PCEPErrors.MONITORING_OBJECT_MISSING, Optional.absent()));
         }
         final PcreqMessageBuilder mBuilder = new PcreqMessageBuilder();
         mBuilder.setMonitoringRequest(monReq);
index fc084e53d9db0f31e8ffc11199bf86326af86476..b3cbdf4a250b07025e8fca627b282ea238c631b1 100644 (file)
@@ -114,7 +114,7 @@ public class PCEPNotificationMessageParser extends AbstractMessageParser {
             if (obj instanceof Rp) {
                 final Rp rp = (Rp) obj;
                 if (rp.isProcessingRule()) {
-                    errors.add(createErrorMsg(PCEPErrors.P_FLAG_NOT_SET, Optional.<Rp>absent()));
+                    errors.add(createErrorMsg(PCEPErrors.P_FLAG_NOT_SET, Optional.absent()));
                     return null;
                 }
                 requestParameters.add(new RpsBuilder().setRp(rp).build());
index f174296fbc91a7ab80f8cb872e41e730db38c791..e02439973aa9db4083e01cadf44a97441c09f867 100644 (file)
@@ -167,7 +167,7 @@ public class PCEPReplyMessageParser extends AbstractMessageParser {
     protected Replies getValidReply(final List<Object> objects, final List<Message> errors) throws PCEPDeserializerException {
         Object object = objects.remove(0);
         if (!(object instanceof Rp)) {
-            errors.add(createErrorMsg(PCEPErrors.RP_MISSING, Optional.<Rp>absent()));
+            errors.add(createErrorMsg(PCEPErrors.RP_MISSING, Optional.absent()));
             return null;
         }
         final Rp rp = (Rp) object;
index 3f93e7e1e92ca886e1f29954ea6f13b06f860c97..18d1d2dfd654d733e2decb93e06d5935f0846a87 100644 (file)
@@ -168,7 +168,7 @@ public class PCEPRequestMessageParser extends AbstractMessageParser {
         if (requests != null) {
             mBuilder.setRequests(requests);
         } else {
-            errors.add(createErrorMsg(PCEPErrors.RP_MISSING, Optional.<Rp>absent()));
+            errors.add(createErrorMsg(PCEPErrors.RP_MISSING, Optional.absent()));
         }
         if (!objects.isEmpty()) {
             throw new PCEPDeserializerException("Unprocessed Objects: " + objects);
@@ -196,13 +196,13 @@ public class PCEPRequestMessageParser extends AbstractMessageParser {
             Rp rpObj = null;
             if (!(objects.get(0) instanceof Rp)) {
                 // if RP obj is missing return error only
-                errors.add(createErrorMsg(PCEPErrors.RP_MISSING, Optional.<Rp>absent()));
+                errors.add(createErrorMsg(PCEPErrors.RP_MISSING, Optional.absent()));
                 return null;
             }
             rpObj = (Rp) objects.get(0);
             objects.remove(0);
             if (!rpObj.isProcessingRule()) {
-                errors.add(createErrorMsg(PCEPErrors.P_FLAG_NOT_SET, Optional.<Rp>absent()));
+                errors.add(createErrorMsg(PCEPErrors.P_FLAG_NOT_SET, Optional.absent()));
             } else {
                 rBuilder.setRp(rpObj);
             }
index 343bbd3feca337b70456606a0a87896ca1f61560..2f6b8a043d2d56659274eb39d8d6da3a54f650d0 100644 (file)
@@ -56,9 +56,9 @@ public final class PathBindingTlvParser implements TlvParser, TlvSerializer {
     static {
         final MplsLabelCodec mplsLabelCodec = new MplsLabelCodec();
         final MplsLabelEntryCodec mplsLabelEntryCodec = new MplsLabelEntryCodec();
-        final Builder<Integer, PathBindingTlvCodec> parsers = ImmutableMap.<Integer, PathBindingTlvCodec>builder();
+        final Builder<Integer, PathBindingTlvCodec> parsers = ImmutableMap.builder();
         final Builder<Class<? extends BindingTypeValue>, PathBindingTlvCodec> serializers =
-                ImmutableMap.<Class<? extends BindingTypeValue>, PathBindingTlvCodec>builder();
+                ImmutableMap.builder();
 
         parsers.put(mplsLabelCodec.getBindingType(), mplsLabelCodec);
         serializers.put(MplsLabel.class, mplsLabelCodec);
index 48ae2a56759ff78683fd9de5cd91c5efd209e665..aeb91de6d3a0e0bbfa99b36391e15eca8a4117f8 100644 (file)
@@ -85,7 +85,7 @@ public final class Stateful07ErrorMessageParser extends PCEPErrorMessageParser {
         } else if (obj instanceof Rp) {
             final Rp o = (Rp) obj;
             if (o.isProcessingRule()) {
-                errors.add(createErrorMsg(PCEPErrors.P_FLAG_NOT_SET, Optional.<Rp>absent()));
+                errors.add(createErrorMsg(PCEPErrors.P_FLAG_NOT_SET, Optional.absent()));
                 return null;
             }
             requestParameters.add(new RpsBuilder().setRp(o).build());
index 60d3744e62d1a9d578e2c306f044b5a7ba4869a5..3ecd13044d03e727435b44846aadb223a6a3f000 100644 (file)
@@ -139,14 +139,14 @@ public class Stateful07PCReportMessageParser extends AbstractMessageParser {
             final Lsp lsp = (Lsp) object;
             final org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev131222.lsp.object.lsp.Tlvs tlvs = lsp.getTlvs();
             if (!lspViaSR && lsp.getPlspId().getValue() != 0 && (tlvs == null || tlvs.getLspIdentifiers() == null)) {
-                final Message errorMsg = createErrorMsg(PCEPErrors.LSP_IDENTIFIERS_TLV_MISSING, Optional.<Rp>absent());
+                final Message errorMsg = createErrorMsg(PCEPErrors.LSP_IDENTIFIERS_TLV_MISSING, Optional.absent());
                 errors.add(errorMsg);
                 return false;
             } else {
                 builder.setLsp(lsp);
             }
         } else {
-            errors.add(createErrorMsg(PCEPErrors.LSP_MISSING, Optional.<Rp>absent()));
+            errors.add(createErrorMsg(PCEPErrors.LSP_MISSING, Optional.absent()));
             return false;
         }
         return true;
@@ -158,7 +158,7 @@ public class Stateful07PCReportMessageParser extends AbstractMessageParser {
         if (object instanceof Ero) {
             pBuilder.setEro((Ero) object);
         } else {
-            errors.add(createErrorMsg(PCEPErrors.ERO_MISSING, Optional.<Rp>absent()));
+            errors.add(createErrorMsg(PCEPErrors.ERO_MISSING, Optional.absent()));
             return false;
         }
         parsePath(objects, pBuilder);
index dcb250a5d62a3848fa307714d7365163129a1219..e0d75ad9e6beda415c368506ed986a5a6420bc29 100644 (file)
@@ -112,7 +112,7 @@ public class Stateful07PCUpdateRequestMessageParser extends AbstractMessageParse
                 object = objects.remove(0);
             }
         } else {
-            errors.add(createErrorMsg(PCEPErrors.SRP_MISSING, Optional.<Rp>absent()));
+            errors.add(createErrorMsg(PCEPErrors.SRP_MISSING, Optional.absent()));
         }
 
         if (validateLsp(object, errors, builder)) {
@@ -131,7 +131,7 @@ public class Stateful07PCUpdateRequestMessageParser extends AbstractMessageParse
         if (object instanceof Lsp) {
             builder.setLsp((Lsp) object);
         } else {
-            errors.add(createErrorMsg(PCEPErrors.LSP_MISSING, Optional.<Rp>absent()));
+            errors.add(createErrorMsg(PCEPErrors.LSP_MISSING, Optional.absent()));
             return false;
         }
         return true;
@@ -143,7 +143,7 @@ public class Stateful07PCUpdateRequestMessageParser extends AbstractMessageParse
         if (object instanceof Ero) {
             pBuilder.setEro((Ero) object);
         } else {
-            errors.add(createErrorMsg(PCEPErrors.ERO_MISSING, Optional.<Rp>absent()));
+            errors.add(createErrorMsg(PCEPErrors.ERO_MISSING, Optional.absent()));
             return false;
         }
         parsePath(objects, pBuilder);
index dbf4a56b3dbac3a580b46a271df29c9523e0c30f..6d23cfc80dd0c46cc0070ef2aa30522e70b245e8 100644 (file)
@@ -322,7 +322,7 @@ public class PCEPValidatorTest {
         builder.setOpen(b.build());
 
         assertEquals(new OpenBuilder().setOpenMessage(builder.build()).build(), parser.parseMessage(result.slice(4,
-            result.readableBytes() - 4), Collections.<Message> emptyList()));
+            result.readableBytes() - 4), Collections.emptyList()));
         final ByteBuf buf = Unpooled.buffer(result.readableBytes());
         parser.serializeMessage(new OpenBuilder().setOpenMessage(builder.build()).build(), buf);
         assertArrayEquals(result.array(), buf.array());
@@ -341,7 +341,7 @@ public class PCEPValidatorTest {
         final PCEPKeepAliveMessageParser parser = new PCEPKeepAliveMessageParser(this.objectRegistry);
         final KeepaliveBuilder builder = new KeepaliveBuilder().setKeepaliveMessage(new KeepaliveMessageBuilder().build());
 
-        assertEquals(builder.build(), parser.parseMessage(result.slice(4, result.readableBytes() - 4), Collections.<Message> emptyList()));
+        assertEquals(builder.build(), parser.parseMessage(result.slice(4, result.readableBytes() - 4), Collections.emptyList()));
         final ByteBuf buf = Unpooled.buffer(result.readableBytes());
         parser.serializeMessage(builder.build(), buf);
         assertArrayEquals(result.array(), buf.array());
@@ -353,7 +353,7 @@ public class PCEPValidatorTest {
         final PCEPStartTLSMessageParser parser = new PCEPStartTLSMessageParser(this.objectRegistry);
         final StarttlsBuilder builder = new StarttlsBuilder().setStartTlsMessage(new StartTlsMessageBuilder().build());
 
-        assertEquals(builder.build(), parser.parseMessage(result.slice(4, result.readableBytes() - 4), Collections.<Message> emptyList()));
+        assertEquals(builder.build(), parser.parseMessage(result.slice(4, result.readableBytes() - 4), Collections.emptyList()));
         final ByteBuf buf = Unpooled.buffer(result.readableBytes());
         parser.serializeMessage(builder.build(), buf);
         assertArrayEquals(result.array(), buf.array());
@@ -367,7 +367,7 @@ public class PCEPValidatorTest {
         final CloseBuilder builder = new CloseBuilder().setCCloseMessage(new CCloseMessageBuilder().setCClose(
             new CCloseBuilder().setIgnore(false).setProcessingRule(false).setReason((short) 5).setTlvs(new TlvsBuilder().build()).build()).build());
 
-        assertEquals(builder.build(), parser.parseMessage(result.slice(4, result.readableBytes() - 4), Collections.<Message> emptyList()));
+        assertEquals(builder.build(), parser.parseMessage(result.slice(4, result.readableBytes() - 4), Collections.emptyList()));
         final ByteBuf buf = Unpooled.buffer(result.readableBytes());
         parser.serializeMessage(builder.build(), buf);
         assertArrayEquals(result.array(), buf.array());
@@ -395,7 +395,7 @@ public class PCEPValidatorTest {
         builder.setRequests(reqs1);
 
         assertEquals(new PcreqBuilder().setPcreqMessage(builder.build()).build(), parser.parseMessage(result.slice(4,
-            result.readableBytes() - 4), Collections.<Message> emptyList()));
+            result.readableBytes() - 4), Collections.emptyList()));
         ByteBuf buf = Unpooled.buffer(result.readableBytes());
         parser.serializeMessage(new PcreqBuilder().setPcreqMessage(builder.build()).build(), buf);
 
@@ -417,7 +417,7 @@ public class PCEPValidatorTest {
             this.svec).build()));
 
         assertEquals(new PcreqBuilder().setPcreqMessage(builder.build()).build(), parser.parseMessage(result.slice(4,
-            result.readableBytes() - 4), Collections.<Message> emptyList()));
+            result.readableBytes() - 4), Collections.emptyList()));
         buf = Unpooled.buffer(result.readableBytes());
         parser.serializeMessage(new PcreqBuilder().setPcreqMessage(builder.build()).build(), buf);
         assertArrayEquals(result.array(), buf.array());
@@ -429,7 +429,7 @@ public class PCEPValidatorTest {
             assertEquals("Requests cannot be null or empty.", e.getMessage());
         }
         try {
-            parser.serializeMessage(new PcreqBuilder().setPcreqMessage(new PcreqMessageBuilder().setRequests(Collections.<Requests> emptyList()).build()).build(), null);
+            parser.serializeMessage(new PcreqBuilder().setPcreqMessage(new PcreqMessageBuilder().setRequests(Collections.emptyList()).build()).build(), null);
             fail();
         } catch (final IllegalArgumentException e) {
             assertEquals("Requests cannot be null or empty.", e.getMessage());
@@ -452,7 +452,7 @@ public class PCEPValidatorTest {
         builder.setReplies(replies1);
 
         assertEquals(new PcrepBuilder().setPcrepMessage(builder.build()).build(), parser.parseMessage(result.slice(4,
-            result.readableBytes() - 4), Collections.<Message> emptyList()));
+            result.readableBytes() - 4), Collections.emptyList()));
         ByteBuf buf = Unpooled.buffer(result.readableBytes());
         parser.serializeMessage(new PcrepBuilder().setPcrepMessage(builder.build()).build(), buf);
         assertArrayEquals(result.array(), buf.array());
@@ -470,7 +470,7 @@ public class PCEPValidatorTest {
         builder.setReplies(replies2);
 
         assertEquals(new PcrepBuilder().setPcrepMessage(builder.build()).build(), parser.parseMessage(result.slice(4,
-            result.readableBytes() - 4), Collections.<Message> emptyList()));
+            result.readableBytes() - 4), Collections.emptyList()));
         buf = Unpooled.buffer(result.readableBytes());
         parser.serializeMessage(new PcrepBuilder().setPcrepMessage(builder.build()).build(), buf);
         assertArrayEquals(result.array(), buf.array());
@@ -486,7 +486,7 @@ public class PCEPValidatorTest {
         builder.setReplies(replies3);
 
         assertEquals(new PcrepBuilder().setPcrepMessage(builder.build()).build(), parser.parseMessage(result.slice(4,
-            result.readableBytes() - 4), Collections.<Message> emptyList()));
+            result.readableBytes() - 4), Collections.emptyList()));
         buf = Unpooled.buffer(result.readableBytes());
         parser.serializeMessage(new PcrepBuilder().setPcrepMessage(builder.build()).build(), buf);
         assertArrayEquals(result.array(), buf.array());
@@ -509,7 +509,7 @@ public class PCEPValidatorTest {
         builder.setReplies(replies4);
 
         assertEquals(new PcrepBuilder().setPcrepMessage(builder.build()).build(), parser.parseMessage(result.slice(4,
-            result.readableBytes() - 4), Collections.<Message> emptyList()));
+            result.readableBytes() - 4), Collections.emptyList()));
         buf = Unpooled.buffer(result.readableBytes());
         parser.serializeMessage(new PcrepBuilder().setPcrepMessage(builder.build()).build(), buf);
         assertArrayEquals(result.array(), buf.array());
@@ -521,7 +521,7 @@ public class PCEPValidatorTest {
             assertEquals("Replies cannot be null or empty.", e.getMessage());
         }
         try {
-            parser.serializeMessage(new PcrepBuilder().setPcrepMessage(new PcrepMessageBuilder().setReplies(Collections.<Replies> emptyList()).build()).build(), null);
+            parser.serializeMessage(new PcrepBuilder().setPcrepMessage(new PcrepMessageBuilder().setReplies(Collections.emptyList()).build()).build(), null);
             fail();
         } catch (final IllegalArgumentException e) {
             assertEquals("Replies cannot be null or empty.", e.getMessage());
@@ -565,7 +565,7 @@ public class PCEPValidatorTest {
         builder.setNotifications(nots);
 
         assertEquals(new PcntfBuilder().setPcntfMessage(builder.build()).build(), parser.parseMessage(result.slice(4,
-            result.readableBytes() - 4), Collections.<Message> emptyList()));
+            result.readableBytes() - 4), Collections.emptyList()));
         final ByteBuf buf = Unpooled.buffer(result.readableBytes());
         parser.serializeMessage(new PcntfBuilder().setPcntfMessage(builder.build()).build(), buf);
         assertArrayEquals(result.array(), buf.array());
@@ -593,7 +593,7 @@ public class PCEPValidatorTest {
         builder.setErrorType(new RequestCaseBuilder().setRequest(new RequestBuilder().setRps(rps).build()).build());
 
         assertEquals(new PcerrBuilder().setPcerrMessage(builder.build()).build(), parser.parseMessage(result.slice(4,
-            result.readableBytes() - 4), Collections.<Message> emptyList()));
+            result.readableBytes() - 4), Collections.emptyList()));
         ByteBuf buf = Unpooled.buffer(result.readableBytes());
         parser.serializeMessage(new PcerrBuilder().setPcerrMessage(builder.build()).build(), buf);
         assertArrayEquals(result.array(), buf.array());
@@ -609,7 +609,7 @@ public class PCEPValidatorTest {
         builder.setErrorType(new SessionCaseBuilder().setSession(new SessionBuilder().setOpen(this.open).build()).build());
 
         assertEquals(new PcerrBuilder().setPcerrMessage(builder.build()).build(), parser.parseMessage(result.slice(4,
-            result.readableBytes() - 4), Collections.<Message> emptyList()));
+            result.readableBytes() - 4), Collections.emptyList()));
         buf = Unpooled.buffer(result.readableBytes());
         parser.serializeMessage(new PcerrBuilder().setPcerrMessage(builder.build()).build(), buf);
         assertArrayEquals(result.array(), buf.array());
@@ -621,7 +621,7 @@ public class PCEPValidatorTest {
             assertEquals("Errors should not be empty.", e.getMessage());
         }
         try {
-            parser.serializeMessage(new PcerrBuilder().setPcerrMessage(new PcerrMessageBuilder().setErrors(Collections.<Errors> emptyList()).build()).build(), null);
+            parser.serializeMessage(new PcerrBuilder().setPcerrMessage(new PcerrMessageBuilder().setErrors(Collections.emptyList()).build()).build(), null);
             fail();
         } catch (final IllegalArgumentException e) {
             assertEquals("Errors should not be empty.", e.getMessage());
@@ -647,7 +647,7 @@ public class PCEPValidatorTest {
         builder.setRequests(reqs1);
 
         assertEquals(new PcreqBuilder().setPcreqMessage(builder.build()).build(), parser.parseMessage(result.slice(4,
-            result.readableBytes() - 4), Collections.<Message> emptyList()));
+            result.readableBytes() - 4), Collections.emptyList()));
         final ByteBuf buf = Unpooled.buffer(result.readableBytes());
         parser.serializeMessage(new PcreqBuilder().setPcreqMessage(builder.build()).build(), buf);
 
@@ -674,7 +674,7 @@ public class PCEPValidatorTest {
         builder.setReplies(replies);
 
         assertEquals(new PcrepBuilder().setPcrepMessage(builder.build()).build(), parser.parseMessage(result.slice(4,
-            result.readableBytes() - 4), Collections.<Message> emptyList()));
+            result.readableBytes() - 4), Collections.emptyList()));
         final ByteBuf buf = Unpooled.buffer(result.readableBytes());
         parser.serializeMessage(new PcrepBuilder().setPcrepMessage(builder.build()).build(), buf);
         assertArrayEquals(result.array(), buf.array());
@@ -697,7 +697,7 @@ public class PCEPValidatorTest {
 
         ByteBuf result = Unpooled.wrappedBuffer(msgBytes);
         assertEquals(new PcmonrepBuilder().setPcmonrepMessage(builder.build()).build(), parser.parseMessage(result.slice(4,
-                result.readableBytes() - 4), Collections.<Message> emptyList()));
+                result.readableBytes() - 4), Collections.emptyList()));
         ByteBuf buf = Unpooled.buffer(result.readableBytes());
         parser.serializeMessage(new PcmonrepBuilder().setPcmonrepMessage(builder.build()).build(), buf);
         assertArrayEquals(result.array(), buf.array());
@@ -719,7 +719,7 @@ public class PCEPValidatorTest {
 
         result = Unpooled.wrappedBuffer(ByteArray.fileToBytes("src/test/resources/PCMonRep.bin"));
         assertEquals(new PcmonrepBuilder().setPcmonrepMessage(builder.build()).build(), parser.parseMessage(result.slice(4,
-                result.readableBytes() - 4), Collections.<Message> emptyList()));
+                result.readableBytes() - 4), Collections.emptyList()));
         buf = Unpooled.buffer(result.readableBytes());
         parser.serializeMessage(new PcmonrepBuilder().setPcmonrepMessage(builder.build()).build(), buf);
         assertArrayEquals(result.array(), buf.array());
@@ -752,7 +752,7 @@ public class PCEPValidatorTest {
         builder.setReplies(replies4);
 
         assertEquals(new PcrepBuilder().setPcrepMessage(builder.build()).build(), parser.parseMessage(result.slice(4,
-            result.readableBytes() - 4), Collections.<Message> emptyList()));
+            result.readableBytes() - 4), Collections.emptyList()));
         final ByteBuf buf = Unpooled.buffer(result.readableBytes());
         parser.serializeMessage(new PcrepBuilder().setPcrepMessage(builder.build()).build(), buf);
         assertArrayEquals(result.array(), buf.array());
@@ -778,7 +778,7 @@ public class PCEPValidatorTest {
         builder.setRequests(reqs1);
 
         assertEquals(new PcreqBuilder().setPcreqMessage(builder.build()).build(), parser.parseMessage(result.slice(4,
-                result.readableBytes() - 4), Collections.<Message> emptyList()));
+                result.readableBytes() - 4), Collections.emptyList()));
         final ByteBuf buf = Unpooled.buffer(result.readableBytes());
         parser.serializeMessage(new PcreqBuilder().setPcreqMessage(builder.build()).build(), buf);
 
@@ -803,7 +803,7 @@ public class PCEPValidatorTest {
         };
         ByteBuf result = Unpooled.wrappedBuffer(msgBytes);
         assertEquals(new PcmonreqBuilder().setPcreqMessage(builder.build()).build(), parser.parseMessage(result.slice(4,
-                result.readableBytes() - 4), Collections.<Message> emptyList()));
+                result.readableBytes() - 4), Collections.emptyList()));
         ByteBuf buf = Unpooled.buffer(result.readableBytes());
         parser.serializeMessage(new PcmonreqBuilder().setPcreqMessage(builder.build()).build(), buf);
         assertArrayEquals(result.array(), buf.array());
@@ -828,7 +828,7 @@ public class PCEPValidatorTest {
         builder.setMonitoringRequest(monReqBuilder.build());
 
         assertEquals(new PcmonreqBuilder().setPcreqMessage(builder.build()).build(), parser.parseMessage(result.slice(4,
-            result.readableBytes() - 4), Collections.<Message> emptyList()));
+            result.readableBytes() - 4), Collections.emptyList()));
         buf = Unpooled.buffer(result.readableBytes());
         parser.serializeMessage(new PcmonreqBuilder().setPcreqMessage(builder.build()).build(), buf);
         assertArrayEquals(result.array(), buf.array());
index 17bf03393313ecd894c89957c8ae0f59dbc70000..62ae0f80b48afadc4ea8bfba6670b31f136f6604 100644 (file)
@@ -116,7 +116,7 @@ public final class PCCTunnelManagerImpl implements PCCTunnelManager {
             //check if session really has a delegation
             if (hasDelegation(tunnel, session)) {
                 //send report D=0
-                final Tlvs tlvs = buildTlvs(tunnel, plspId.getValue(), Optional.<List<Subobject>>absent());
+                final Tlvs tlvs = buildTlvs(tunnel, plspId.getValue(), Optional.absent());
                 final Pcrpt pcrtp = createPcRtpMessage(new LspBuilder(update.getLsp()).setSync(true).setOperational(OperationalStatus.Up).setDelegate(false).
                     setTlvs(tlvs).build(), Optional.of(createSrp(srpId)), tunnel.getLspState());
                 session.sendReport(pcrtp);
@@ -148,7 +148,7 @@ public final class PCCTunnelManagerImpl implements PCCTunnelManager {
                 tunnel.cancelTimeouts();
                 setDelegation(plspId, session);
                 //send report
-                final Tlvs tlvs = buildTlvs(tunnel, plspId.getValue(), Optional.<List<Subobject>>absent());
+                final Tlvs tlvs = buildTlvs(tunnel, plspId.getValue(), Optional.absent());
                 session.sendReport(createPcRtpMessage(
                     new LspBuilder(request.getLsp()).setSync(true).setOperational(OperationalStatus.Up).setDelegate(true).setTlvs(tlvs).build(),
                     Optional.of(createSrp(srpId)), tunnel.getLspState()));
@@ -321,7 +321,7 @@ public final class PCCTunnelManagerImpl implements PCCTunnelManager {
              missedLsp <= this.syncOptimization.getLocalLspDbVersionValue().longValue(); missedLsp++) {
             final PlspId plspId = new PlspId(missedLsp);
             final PCCTunnel tunnel = this.tunnels.get(plspId);
-            createLspAndSendReport(missedLsp, tunnel, session, Optional.<Boolean>absent(), NO_SRP);
+            createLspAndSendReport(missedLsp, tunnel, session, Optional.absent(), NO_SRP);
         }
     }
 
@@ -341,7 +341,7 @@ public final class PCCTunnelManagerImpl implements PCCTunnelManager {
     }
 
     private void sendEndOfSynchronization(final PCCSession session) {
-        sendEndOfSynchronization(session, Optional.<SrpIdNumber>absent());
+        sendEndOfSynchronization(session, Optional.absent());
     }
 
     private void sendEndOfSynchronization(final PCCSession session, final Optional<SrpIdNumber> operationId) {
@@ -354,12 +354,12 @@ public final class PCCTunnelManagerImpl implements PCCTunnelManager {
             tlv = createLspTlvsEndofSync(this.syncOptimization.incrementLspDBVersion().get());
         }
         final Pcrpt pcrtp = createPcRtpMessage(createLsp(0, false, tlv, true, false), Optional.fromNullable(srp), createPath(Collections
-            .<Subobject>emptyList()));
+            .emptyList()));
         session.sendReport(pcrtp);
     }
 
     private void reportAllKnownLsp(final PCCSession session) {
-        reportAllKnownLsp(Optional.<SrpIdNumber>absent(), session);
+        reportAllKnownLsp(Optional.absent(), session);
     }
 
     private void reportAllKnownLsp(final Optional<SrpIdNumber> operationId, final PCCSession session) {
@@ -371,7 +371,7 @@ public final class PCCTunnelManagerImpl implements PCCTunnelManager {
         for (final Entry<PlspId, PCCTunnel> entry : this.tunnels.entrySet()) {
             final PCCTunnel tunnel = entry.getValue();
             final long plspId = entry.getKey().getValue();
-            createLspAndSendReport(plspId, tunnel, session, Optional.<Boolean>absent(), Optional.fromNullable(srp));
+            createLspAndSendReport(plspId, tunnel, session, Optional.absent(), Optional.fromNullable(srp));
         }
     }
 
@@ -410,8 +410,8 @@ public final class PCCTunnelManagerImpl implements PCCTunnelManager {
                     if (tunnel.getType() == LspType.PCE_LSP) {
                         PCCTunnelManagerImpl.this.tunnels.remove(plspId);
                         //report tunnel removal to all
-                        sendToAll(tunnel, plspId, Collections.<Subobject>emptyList(), createSrp(0), new PathBuilder().build(),
-                            createLsp(plspId.getValue(), false, Optional.<Tlvs>absent(), false, true));
+                        sendToAll(tunnel, plspId, Collections.emptyList(), createSrp(0), new PathBuilder().build(),
+                            createLsp(plspId.getValue(), false, Optional.absent(), false, true));
                     }
                 }
             }, this.stateTimeout, TimeUnit.SECONDS);
@@ -435,7 +435,7 @@ public final class PCCTunnelManagerImpl implements PCCTunnelManager {
                     final PCCSession nextSession = PCCTunnelManagerImpl.this.sessions.get(index);
                     if (nextSession != null) {
                         tunnel.cancelTimeouts();
-                        final Tlvs tlvs = buildTlvs(tunnel, plspId.getValue(), Optional.<List<Subobject>>absent());
+                        final Tlvs tlvs = buildTlvs(tunnel, plspId.getValue(), Optional.absent());
 
                         nextSession.sendReport(createPcRtpMessage(
                             createLsp(plspId.getValue(), true, Optional.fromNullable(tlvs), true, false), NO_SRP,
index 11d79b5cd1630a15c7b344dd0a86bf173df40f82..1c5ec5ef046bb98253c689f1e499cf25fe1af661 100644 (file)
@@ -50,7 +50,7 @@ public class TimerHandler {
         @Override
         public void run(final Timeout timeout) throws Exception {
             LOG.debug("Reconnecting PCCs}");
-            pcCsBuilder.createPCCs(syncOptDBVersion.isPresent() ? syncOptDBVersion.get() : BigInteger.ONE, Optional.<TimerHandler>absent());
+            pcCsBuilder.createPCCs(syncOptDBVersion.isPresent() ? syncOptDBVersion.get() : BigInteger.ONE, Optional.absent());
         }
     }
 
index 9f018b3f818f2daad6c1dbefa4d75658750ee09f..c75f75bf354e403f55d328a9d3a44711f55a2efd 100644 (file)
@@ -124,7 +124,7 @@ public final class MsgBuilderUtil {
 
     public static Tlvs createLspTlvs(final long lspId, final boolean symbolicPathName, final String tunnelEndpoint,
                                      final String tunnelSender, final String extendedTunnelAddress, final Optional<byte[]> symbolicName) {
-        return createLspTlvs(lspId, symbolicPathName, tunnelEndpoint, tunnelSender, extendedTunnelAddress, symbolicName, Optional.<BigInteger>absent());
+        return createLspTlvs(lspId, symbolicPathName, tunnelEndpoint, tunnelSender, extendedTunnelAddress, symbolicName, Optional.absent());
     }
 
     public static Tlvs createLspTlvs(final long lspId, final boolean symbolicPathName, final String tunnelEndpoint,
index 96244f33af34e97a386857a6011970a8a2adc993..90ce8817e31aa27d64ff1857d769b8508300f347 100644 (file)
@@ -126,7 +126,7 @@ public class PCCSessionListenerTest {
         final PCCSessionListener listener = new PCCSessionListener(1, tunnelManager, false);
         listener.onSessionUp(mockedSession);
         listener.sendError(MsgBuilderUtil.createErrorMsg(PCEPErrors.ATTEMPT_2ND_SESSION, 0));
-        Mockito.verify(mockedSession).sendMessage(Mockito.<Message>any());
+        Mockito.verify(mockedSession).sendMessage(Mockito.any());
     }
 
     @Test
@@ -134,7 +134,7 @@ public class PCCSessionListenerTest {
         final PCCSessionListener listener = new PCCSessionListener(1, tunnelManager, false);
         listener.onSessionUp(mockedSession);
         listener.sendReport(null);
-        Mockito.verify(mockedSession).sendMessage(Mockito.<Message>any());
+        Mockito.verify(mockedSession).sendMessage(Mockito.any());
     }
 
     @Test
index 18bb21ebd49d4428b8e3a31dc7c256ccbbc7f681..c80dd5c97c2dfff871fcc11285f2fff891ac37d1 100644 (file)
@@ -34,7 +34,7 @@ public class PCCSyncAvoidanceProcedureTest extends PCCMockCommon {
         final TestingSessionListener pceSessionListener = getListener(factory);
         assertNotNull(pceSessionListener);
         assertNotNull(pceSessionListener.getSession());
-        checkResyncSession(Optional.<Integer>absent(), 11, null, BigInteger.valueOf(10), pceSessionListener);
+        checkResyncSession(Optional.absent(), 11, null, BigInteger.valueOf(10), pceSessionListener);
         channel.close().get();
     }
 
index a1b462031cd1b9fd8d4ba3c2801c4969e91a1ef8..dac29864de95d39990188ec242e4144bfea949a7 100644 (file)
@@ -304,7 +304,7 @@ public class PCCTunnelManagerImplTest {
     }
 
     private Updates createUpdate(final long plspId) {
-        return createUpdate(plspId, Optional.<Boolean>absent());
+        return createUpdate(plspId, Optional.absent());
     }
 
     private static Updates createUpdate(final long plspId, final Optional<Boolean> delegate) {
@@ -340,15 +340,15 @@ public class PCCTunnelManagerImplTest {
     }
 
     private static Requests createRequestsRemove(final long plspId) {
-        return createRequests(plspId, Optional.of(true), Optional.<Boolean>absent());
+        return createRequests(plspId, Optional.of(true), Optional.absent());
     }
 
     private static Requests createRequestsDelegate(final long plspId) {
-        return createRequests(plspId, Optional.<Boolean>absent(), Optional.of(true));
+        return createRequests(plspId, Optional.absent(), Optional.of(true));
     }
 
     private static Requests createRequests(final long plspId) {
-        return createRequests(plspId, Optional.<Boolean>absent(), Optional.<Boolean>absent());
+        return createRequests(plspId, Optional.absent(), Optional.absent());
     }
 
     private static PCEPErrors getError(final Pcerr errorMessage) {
index 0bc3dfa12e35c9bad8b7d6e4196fb435b1f35df9..655900e1665648dc9a8628bf359e3ed0aa1b3cc2 100644 (file)
@@ -66,7 +66,7 @@ public class AbstractMessageParserTest {
             } else if (objects.get(0) instanceof ErrorObject) {
                 final short errorType = ((ErrorObject) objects.get(0)).getType();
                 final short errorValue = ((ErrorObject) objects.get(0)).getValue();
-                return createErrorMsg(PCEPErrors.forValue(errorType, errorValue), Optional.<Rp>absent());
+                return createErrorMsg(PCEPErrors.forValue(errorType, errorValue), Optional.absent());
             }
             return null;
         }
@@ -91,7 +91,7 @@ public class AbstractMessageParserTest {
 
         Mockito.verify(this.registry, Mockito.only()).serializeObject(Mockito.any(Object.class), Mockito.any(ByteBuf.class));
 
-        final Message b = a.parseMessage(Unpooled.wrappedBuffer(new byte[] {0x0D, 0x13, 0, 0x08, 0, 0, 1, 1 }), Collections.<Message> emptyList());
+        final Message b = a.parseMessage(Unpooled.wrappedBuffer(new byte[] {0x0D, 0x13, 0, 0x08, 0, 0, 1, 1 }), Collections.emptyList());
 
         assertEquals(this.object, ((Pcerr) b).getPcerrMessage().getErrors().get(0).getErrorObject());
     }
@@ -104,7 +104,7 @@ public class AbstractMessageParserTest {
         parser.serializeVendorInformationObjects(Lists.newArrayList(this.viObject), buffer);
         Mockito.verify(this.registry, Mockito.only()).serializeVendorInformationObject(Mockito.any(VendorInformationObject.class), Mockito.any(ByteBuf.class));
 
-        final Message msg = parser.parseMessage(Unpooled.wrappedBuffer(new byte[] {0x22, 0x13, 0x00, 0x08, 0, 0, 0, 0 }), Collections.<Message> emptyList());
+        final Message msg = parser.parseMessage(Unpooled.wrappedBuffer(new byte[] {0x22, 0x13, 0x00, 0x08, 0, 0, 0, 0 }), Collections.emptyList());
 
         assertEquals(this.viObject, ((Pcrep)msg).getPcrepMessage().getReplies().get(0).getVendorInformationObject().get(0));
     }
index 253b22c69e18bd40105144c1d1608ea5b9a7f223..2e7951f4c547462df2f308449a58fab376fde397 100644 (file)
@@ -183,7 +183,7 @@ public class RegistryTest {
         this.ctx.getObjectHandlerRegistry().parseObject(4, 1, new ObjectHeaderImpl(true, false), buffer);
         this.ctx.getObjectHandlerRegistry().serializeObject(new OpenBuilder().build(), buffer);
 
-        this.ctx.getMessageHandlerRegistry().parseMessage(6, buffer, Collections.<Message> emptyList());
+        this.ctx.getMessageHandlerRegistry().parseMessage(6, buffer, Collections.emptyList());
         this.ctx.getMessageHandlerRegistry().serializeMessage(new KeepaliveBuilder().build(), buffer);
 
         this.ctx.getVendorInformationObjectRegistry().parseVendorInformationObject(new EnterpriseNumber(10L), new ObjectHeaderImpl(true, false), buffer);
index fc424dfddc45b36551278eda6098ca39b78a7db7..f12997cee9f5087ed7d8689f736b5677d0c6d2e2 100644 (file)
@@ -52,16 +52,16 @@ final class OperationResults implements OperationResult {
     }
 
     ListenableFuture<OperationResult> future() {
-        return Futures.<OperationResult> immediateFuture(this);
+        return Futures.immediateFuture(this);
     }
 
     public static OperationResults createFailed(final List<Errors> errors) {
-        final List<Errors> e = errors != null ? errors : Collections.<Errors>emptyList();
+        final List<Errors> e = errors != null ? errors : Collections.emptyList();
         return new OperationResults(FailureType.Failed, Lists.transform(e, CONVERT_ERRORS));
     }
 
     public static OperationResults createUnsent(final PCEPErrors error) {
-        final List<Errors> e = error != null ? Collections.singletonList(getErrorFor(error)) : Collections.<Errors>emptyList();
+        final List<Errors> e = error != null ? Collections.singletonList(getErrorFor(error)) : Collections.emptyList();
         return new OperationResults(FailureType.Unsent, Lists.transform(e, CONVERT_ERRORS));
     }
 
index 2dd33d1712c901e170169474b8444dd43c46d4d1..7d34cdf3e88b33b3f86e43ea68deedd0838afdc7 100644 (file)
@@ -115,7 +115,7 @@ class Stateful07TopologySessionListener extends AbstractTopologySessionListener<
             final Stateful stateful = tlvs.getAugmentation(Tlvs1.class).getStateful();
             if (stateful != null) {
                 getSessionListenerState().setPeerCapabilities(getCapabilities(stateful));
-                pccBuilder.setReportedLsp(Collections.<ReportedLsp> emptyList());
+                pccBuilder.setReportedLsp(Collections.emptyList());
                 if (isSynchronized()) {
                     pccBuilder.setStateSync(PccSyncState.Synchronized);
                 } else if (isTriggeredInitialSynchro()) {
index 7f9fb8f0779e4f89edd8f117626ec95872ac7c3f..4c755fff6a2f92d5c6c0d32e729ce5ead5793c35 100644 (file)
@@ -118,7 +118,7 @@ public abstract class AbstractPCEPSessionTest<T extends TopologySessionListenerF
                 return channelFuture;
             }
         }).when(this.clientListener).writeAndFlush(any(Notification.class));
-        doReturn(null).when(this.channelFuture).addListener(Mockito.<GenericFutureListener<? extends Future<? super Void>>>any());
+        doReturn(null).when(this.channelFuture).addListener(Mockito.any());
         doReturn("TestingChannel").when(this.clientListener).toString();
         doReturn(this.pipeline).when(this.clientListener).pipeline();
         doReturn(this.pipeline).when(this.pipeline).replace(any(ChannelHandler.class), any(String.class), any(ChannelHandler.class));
index e8e8ba3206ec0bfb865bc152136af7de07355357..505acdb71f14ff493500762bb7d0fafed33a9099 100644 (file)
@@ -131,7 +131,7 @@ public class IncrementalSynchronizationProcedureTest extends AbstractPCEPSession
                 .setSymbolicPathName(new SymbolicPathNameBuilder().setPathName(new SymbolicPathName(pathname.getBytes())).build())
                 .addAugmentation(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.pcep.sync.optimizations.rev150714.Tlvs1.class, new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.pcep.sync
                     .optimizations.rev150714.Tlvs1Builder().setLspDbVersion(new LspDbVersionBuilder().setLspDbVersionValue(BigInteger.valueOf(val)).build()).build()).build()).setPlspId(new PlspId(val)
-        ).setSync(true).setRemove(false).setOperational(OperationalStatus.Active).build(), Optional.<Srp>absent(), createPath(Collections.<Subobject>emptyList()));
+        ).setSync(true).setRemove(false).setOperational(OperationalStatus.Active).build(), Optional.absent(), createPath(Collections.emptyList()));
     }
 
     private Pcrpt getSyncPcrt() {
@@ -139,6 +139,6 @@ public class IncrementalSynchronizationProcedureTest extends AbstractPCEPSession
                 new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev131222.lsp.object.lsp.TlvsBuilder().addAugmentation(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.pcep.sync.optimizations.rev150714.Tlvs1.class,
                     new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.pcep.sync
                         .optimizations.rev150714.Tlvs1Builder().setLspDbVersion(new LspDbVersionBuilder().setLspDbVersionValue(BigInteger.valueOf(3L)).build()).build()).build()), true, false), Optional.<Srp>absent(),
-            createPath(Collections.<Subobject>emptyList()));
+            createPath(Collections.emptyList()));
     }
 }
index 7a0f6bdf016713103e9f4f396705385ca59887ee..c40d740f7041c717866866743a01b66fbb5ecbe0 100644 (file)
@@ -172,7 +172,7 @@ public class PCEPTriggeredReSynchronizationProcedureTest extends AbstractPCEPSes
                     org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.pcep.sync.optimizations.rev150714.Tlvs1.class,
                     new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.pcep.sync.optimizations.rev150714.Tlvs1Builder()
                         .setLspDbVersion(new LspDbVersionBuilder().setLspDbVersionValue(BigInteger.valueOf(3L)).build()).build()).build()), true, false),
-                            Optional.of(srpBuilder.build()), createPath(Collections.<Subobject>emptyList()));
+                            Optional.of(srpBuilder.build()), createPath(Collections.emptyList()));
     }
 
     private Pcrpt getPcrt() {
@@ -183,7 +183,7 @@ public class PCEPTriggeredReSynchronizationProcedureTest extends AbstractPCEPSes
                     .addAugmentation(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.pcep.sync.optimizations.rev150714.Tlvs1.class,
                         new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.pcep.sync.optimizations.rev150714.Tlvs1Builder()
                             .setLspDbVersion(new LspDbVersionBuilder().setLspDbVersionValue(BigInteger.valueOf(1L)).build()).build()).build())
-                .setPlspId(new PlspId(1L)).setSync(true).setRemove(false).setOperational(OperationalStatus.Active).build(), Optional.<Srp>absent(),
-            createPath(Collections.<Subobject>emptyList()));
+                .setPlspId(new PlspId(1L)).setSync(true).setRemove(false).setOperational(OperationalStatus.Active).build(), Optional.absent(),
+            createPath(Collections.emptyList()));
     }
 }
index a109c9de44fdd10ca828f70c4cbffa3df510adf9..cd7aaa67871c9ef3e007caffd3f9ab180d94bdd7 100644 (file)
@@ -107,8 +107,8 @@ public class PCETriggeredInitialSyncProcedureTest extends AbstractPCEPSessionTes
                         .xml.ns.yang.controller.pcep.sync.optimizations.rev150714.Tlvs1.class, new org.opendaylight
                         .yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.pcep.sync.optimizations.rev150714
                         .Tlvs1Builder().setLspDbVersion(new LspDbVersionBuilder().setLspDbVersionValue(BigInteger
-                        .valueOf(2L)).build()).build()).build()), true, false), Optional.<Srp>absent(),
-                        createPath(Collections.<Subobject>emptyList()));
+                        .valueOf(2L)).build()).build()).build()), true, false), Optional.absent(),
+                        createPath(Collections.emptyList()));
     }
 
     private Pcrpt getPcrpt() {
@@ -121,6 +121,6 @@ public class PCETriggeredInitialSyncProcedureTest extends AbstractPCEPSessionTes
                 .urn.opendaylight.params.xml.ns.yang.controller.pcep.sync.optimizations.rev150714.Tlvs1Builder()
                 .setLspDbVersion(new LspDbVersionBuilder().setLspDbVersionValue(BigInteger.valueOf(3L)).build())
                 .build()).build()).setPlspId(new PlspId(1L)).setSync(true).setRemove(false).setOperational
-            (OperationalStatus.Active).build(), Optional.<Srp>absent(), createPath(Collections.<Subobject>emptyList()));
+            (OperationalStatus.Active).build(), Optional.absent(), createPath(Collections.emptyList()));
     }
 }
index 409160af149372bee6385687a2a30e70e245b267..767994f01a973543135579fd9bd06a816270fdaf 100644 (file)
@@ -101,7 +101,7 @@ public class StateSynchronizationAvoidanceProcedureTest extends AbstractPCEPSess
         final Pcrpt pcRpt = MsgBuilderUtil.createPcRtpMessage(new LspBuilder().setPlspId(new PlspId(1L)).setTlvs(
                 new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev131222.lsp.object.lsp.TlvsBuilder().setLspIdentifiers(new LspIdentifiersBuilder().setLspId(new LspId(1L)).build()).setSymbolicPathName(new SymbolicPathNameBuilder().setPathName(new SymbolicPathName("test".getBytes())).build())
                     .addAugmentation(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.pcep.sync.optimizations.rev150714.Tlvs1.class,
-                            new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.pcep.sync.optimizations.rev150714.Tlvs1Builder().setLspDbVersion(new LspDbVersionBuilder().setLspDbVersionValue(BigInteger.valueOf(1L)).build()).build()).build()).setPlspId(new PlspId(1L)).setSync(true).setRemove(false).setOperational(OperationalStatus.Active).build(), Optional.<Srp>absent(), createPath(Collections.<Subobject> emptyList()));
+                            new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.pcep.sync.optimizations.rev150714.Tlvs1Builder().setLspDbVersion(new LspDbVersionBuilder().setLspDbVersionValue(BigInteger.valueOf(1L)).build()).build()).build()).setPlspId(new PlspId(1L)).setSync(true).setRemove(false).setOperational(OperationalStatus.Active).build(), Optional.absent(), createPath(Collections.emptyList()));
         this.listener.onMessage(session, pcRpt);
         final Topology topo = getTopology().get();
         final PathComputationClient pcc = topo.getNode().get(0).getAugmentation(Node1.class).getPathComputationClient();
@@ -122,9 +122,9 @@ public class StateSynchronizationAvoidanceProcedureTest extends AbstractPCEPSess
         Assert.assertFalse(pcc2.getReportedLsp().isEmpty());
         //sync rpt + LSP-DB
         final Pcrpt syncMsg = MsgBuilderUtil.createPcRtpMessage(createLsp(0, false, Optional.of(
-                new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev131222.lsp.object.lsp.TlvsBuilder().addAugmentation(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.pcep.sync.optimizations.rev150714.Tlvs1.class,
-                        new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.pcep.sync.optimizations.rev150714.Tlvs1Builder().setLspDbVersion(new LspDbVersionBuilder().setLspDbVersionValue(BigInteger.valueOf(2L)).build()).build()).build()), true, false), Optional.<Srp>absent(),
-                createPath(Collections.<Subobject> emptyList()));
+            new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev131222.lsp.object.lsp.TlvsBuilder().addAugmentation(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.pcep.sync.optimizations.rev150714.Tlvs1.class,
+                new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.pcep.sync.optimizations.rev150714.Tlvs1Builder().setLspDbVersion(new LspDbVersionBuilder().setLspDbVersionValue(BigInteger.valueOf(2L)).build()).build()).build()), true, false), Optional.absent(),
+                createPath(Collections.emptyList()));
         this.listener.onMessage(session, syncMsg);
         final Topology topo3 = getTopology().get();
         final PathComputationClient pcc3 = topo3.getNode().get(0).getAugmentation(Node1.class).getPathComputationClient();
index ff70d2d139f542b9bbc2a8ab62b6e70ab7c00092..0608b217d12b03e39f0a96c96321308b6f7b13bd 100755 (executable)
@@ -136,7 +136,7 @@ public class Stateful07TopologySessionListenerTest extends AbstractPCEPSessionTe
         final Requests req = pcinitiate.getPcinitiateMessage().getRequests().get(0);
         final long srpId = req.getSrp().getOperationId().getValue();
         final Tlvs tlvs = createLspTlvs(req.getLsp().getPlspId().getValue(), true,
-            testAddress, testAddress, testAddress, Optional.<byte[]>absent());
+            testAddress, testAddress, testAddress, Optional.absent());
         final Pcrpt pcRpt = MsgBuilderUtil.createPcRtpMessage(new LspBuilder(req.getLsp()).setTlvs(tlvs).setPlspId(new PlspId(1L)).setSync(false).setRemove(false).setOperational(OperationalStatus.Active).build(), Optional.of(MsgBuilderUtil.createSrp(srpId)), MsgBuilderUtil.createPath(req.getEro().getSubobject()));
         final Pcrpt esm = MsgBuilderUtil.createPcRtpMessage(new LspBuilder().setSync(false).build(), Optional.of(MsgBuilderUtil.createSrp(0L)), null);
         this.listener.onMessage(this.session, esm);
@@ -183,7 +183,7 @@ public class Stateful07TopologySessionListenerTest extends AbstractPCEPSessionTe
         final Updates upd = updateMsg.getPcupdMessage().getUpdates().get(0);
         final long srpId2 = upd.getSrp().getOperationId().getValue();
         final Tlvs tlvs2 = createLspTlvs(upd.getLsp().getPlspId().getValue(), false,
-            newDestinationAddress, testAddress, testAddress, Optional.<byte[]>absent());
+            newDestinationAddress, testAddress, testAddress, Optional.absent());
         final Pcrpt pcRpt2 = MsgBuilderUtil.createPcRtpMessage(new LspBuilder(upd.getLsp()).setTlvs(tlvs2).setSync(true).setRemove(false).setOperational(OperationalStatus.Active).build(), Optional.of(MsgBuilderUtil.createSrp(srpId2)), MsgBuilderUtil.createPath(upd.getPath().getEro().getSubobject()));
         this.listener.onMessage(this.session, pcRpt2);
         //check updated lsp
@@ -226,8 +226,8 @@ public class Stateful07TopologySessionListenerTest extends AbstractPCEPSessionTe
         final Requests req2 = pcinitiate2.getPcinitiateMessage().getRequests().get(0);
         final long srpId3 = req2.getSrp().getOperationId().getValue();
         final Tlvs tlvs3 = createLspTlvs(req2.getLsp().getPlspId().getValue(), false,
-            testAddress, testAddress, testAddress, Optional.<byte[]>absent());
-        final Pcrpt pcRpt3 = MsgBuilderUtil.createPcRtpMessage(new LspBuilder(req2.getLsp()).setTlvs(tlvs3).setRemove(true).setSync(true).setOperational(OperationalStatus.Down).build(), Optional.of(MsgBuilderUtil.createSrp(srpId3)), MsgBuilderUtil.createPath(Collections.<Subobject>emptyList()));
+            testAddress, testAddress, testAddress, Optional.absent());
+        final Pcrpt pcRpt3 = MsgBuilderUtil.createPcRtpMessage(new LspBuilder(req2.getLsp()).setTlvs(tlvs3).setRemove(true).setSync(true).setOperational(OperationalStatus.Down).build(), Optional.of(MsgBuilderUtil.createSrp(srpId3)), MsgBuilderUtil.createPath(Collections.emptyList()));
         this.listener.onMessage(this.session, pcRpt3);
         // check if lsp was removed
         topology = getTopology().get();
@@ -252,7 +252,7 @@ public class Stateful07TopologySessionListenerTest extends AbstractPCEPSessionTe
 
     @Test
     public void testOnUnhandledErrorMessage() {
-        final Message errorMsg = AbstractMessageParser.createErrorMsg(PCEPErrors.NON_ZERO_PLSPID, Optional.<Rp>absent());
+        final Message errorMsg = AbstractMessageParser.createErrorMsg(PCEPErrors.NON_ZERO_PLSPID, Optional.absent());
         this.listener.onSessionUp(this.session);
         assertTrue(this.listener.onMessage(Optional.<AbstractTopologySessionListener.MessageContext>absent().orNull(), errorMsg));
     }
@@ -293,7 +293,7 @@ public class Stateful07TopologySessionListenerTest extends AbstractPCEPSessionTe
         final Requests req = pcinitiate.getPcinitiateMessage().getRequests().get(0);
         final long srpId = req.getSrp().getOperationId().getValue();
         final Tlvs tlvs = createLspTlvs(req.getLsp().getPlspId().getValue(), true,
-            testAddress, testAddress, testAddress, Optional.<byte[]>absent());
+            testAddress, testAddress, testAddress, Optional.absent());
         final Pcrpt pcRpt = MsgBuilderUtil.createPcRtpMessage(new LspBuilder(req.getLsp()).setTlvs(tlvs).setSync(true).setRemove(false).setOperational(OperationalStatus.Active).build(), Optional.of(MsgBuilderUtil.createSrp(srpId)), MsgBuilderUtil.createPath(req.getEro().getSubobject()));
         this.listener.onMessage(this.session, pcRpt);
         assertEquals(1, getTopology().get().getNode().size());
@@ -353,7 +353,7 @@ public class Stateful07TopologySessionListenerTest extends AbstractPCEPSessionTe
         final Requests req = pcinitiate.getPcinitiateMessage().getRequests().get(0);
         final long srpId = req.getSrp().getOperationId().getValue();
         final Tlvs tlvs = createLspTlvs(req.getLsp().getPlspId().getValue(), true,
-            testAddress, testAddress, testAddress, Optional.<byte[]>absent());
+            testAddress, testAddress, testAddress, Optional.absent());
         final Pcrpt pcRpt = MsgBuilderUtil.createPcRtpMessage(new LspBuilder(req.getLsp()).setTlvs(tlvs).setPlspId(new PlspId(1L)).setSync(false).setRemove(false).setOperational(OperationalStatus.Active).build(), Optional.of(MsgBuilderUtil.createSrp(srpId)), MsgBuilderUtil.createPath(req.getEro().getSubobject()));
         this.listener.onMessage(this.session, pcRpt);
 
index d25301fc9aab05dbbc61ffa8282c2b1eff341d85..5ba578d2e0dc50dd9877fd8debe188a1d0659aac 100644 (file)
@@ -201,7 +201,7 @@ final class CreateTunnelInstructionExecutor extends AbstractInstructionExecutor
             if (sc.getIpv4Address() != null) {
                 for (final IpAddress dc : dsts) {
                     if (dc.getIpv4Address() != null) {
-                        return Optional.<AddressFamily>of(new Ipv4CaseBuilder().setIpv4(new Ipv4Builder().setSourceIpv4Address(sc.getIpv4Address()).
+                        return Optional.of(new Ipv4CaseBuilder().setIpv4(new Ipv4Builder().setSourceIpv4Address(sc.getIpv4Address()).
                             setDestinationIpv4Address(dc.getIpv4Address()).build()).build());
                     }
                 }
@@ -216,7 +216,7 @@ final class CreateTunnelInstructionExecutor extends AbstractInstructionExecutor
             if (sc.getIpv6Address() != null) {
                 for (final IpAddress dc : dsts) {
                     if (dc.getIpv6Address() != null) {
-                        return Optional.<AddressFamily>of(new Ipv6CaseBuilder().setIpv6(new Ipv6Builder().setSourceIpv6Address(sc.getIpv6Address()).
+                        return Optional.of(new Ipv6CaseBuilder().setIpv6(new Ipv6Builder().setSourceIpv6Address(sc.getIpv6Address()).
                             setDestinationIpv6Address(dc.getIpv6Address()).build()).build());
                     }
                 }
index bef4b709ef3e913512d923e88bb5970f7341f98e..b9acd8ad1fbafd3c7cd3063d87b1429942d6b816 100644 (file)
@@ -38,7 +38,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 final class TunelProgrammingUtil {
-    public static final ListenableFuture<OperationResult> RESULT = Futures.<OperationResult>immediateFuture(new OperationResult() {
+    public static final ListenableFuture<OperationResult> RESULT = Futures.immediateFuture(new OperationResult() {
         @Override
         public Class<? extends DataContainer> getImplementedInterface() {
             return OperationResult.class;
index 6611261790882c50c875988c57fe6603cff0f14c..eb1ec2095f8baa74493cdc8df6c90e27c4827d19 100644 (file)
@@ -82,7 +82,7 @@ public class NodeChangedListenerTest extends AbstractDataBrokerTest {
     @Before
     public void setUp() throws TransactionCommitFailedException {
         final WriteTransaction wTx = getDataBroker().newWriteOnlyTransaction();
-        wTx.put(LogicalDatastoreType.OPERATIONAL, PCEP_TOPO_IID, new TopologyBuilder().setKey(new TopologyKey(PCEP_TOPOLOGY_ID)).setNode(Lists.<Node>newArrayList()).setTopologyId(PCEP_TOPOLOGY_ID).build(), true);
+        wTx.put(LogicalDatastoreType.OPERATIONAL, PCEP_TOPO_IID, new TopologyBuilder().setKey(new TopologyKey(PCEP_TOPOLOGY_ID)).setNode(Lists.newArrayList()).setTopologyId(PCEP_TOPOLOGY_ID).build(), true);
         wTx.put(LogicalDatastoreType.OPERATIONAL, TUNNEL_TOPO_IID, new TopologyBuilder().setKey(new TopologyKey(TUNNEL_TOPOLOGY_ID)).setTopologyId(TUNNEL_TOPOLOGY_ID).build(), true);
         wTx.submit().checkedGet();
         final NodeChangedListener nodeListener = new NodeChangedListener(getDataBroker(), PCEP_TOPOLOGY_ID, TUNNEL_TOPO_IID);
index 26b4b77daa7a1c55684f2c17d437e6f50c27e5a0..59b49a0112e885f65642ba3e15e36b9fa9aef8ed 100644 (file)
@@ -216,7 +216,7 @@ public class TunnelProgrammingTest extends AbstractDataBrokerTest {
         createInputBuilder.setBandwidth(bwd);
         createInputBuilder.setClassType(classType);
         createInputBuilder.setSymbolicPathName(tunnelName);
-        createInputBuilder.setExplicitHops(Lists.<ExplicitHops>newArrayList());
+        createInputBuilder.setExplicitHops(Lists.newArrayList());
         createInputBuilder.addAugmentation(PcepCreateP2pTunnelInput1.class, new PcepCreateP2pTunnelInput1Builder().setAdministrativeStatus(AdministrativeStatus.Active).build());
         this.tunnelProgramming.pcepCreateP2pTunnel(createInputBuilder.build());
         //check add-lsp input
index 079086d09ec73867cac554c51c9a38647e20f343..72f789eec1149bf838a0167934f352869ff2ff44 100644 (file)
@@ -121,7 +121,7 @@ public final class ProgrammingServiceImpl implements AutoCloseable, InstructionS
         final WriteTransaction t = dataProvider.newWriteOnlyTransaction();
         t.put(LogicalDatastoreType.OPERATIONAL, this.qid,
                 new InstructionsQueueBuilder().setKey(instructionsQueueKey).setInstruction(
-                        Collections.<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.programming.rev150720.instruction.queue.Instruction> emptyList()).build());
+                        Collections.emptyList()).build());
         t.submit();
     }
 
index b36add12c8d03ae49a38e3df82c96c759e84bc2d..38185069f357985d835f890a723045dc40e17f99 100644 (file)
@@ -307,7 +307,7 @@ public class ProgrammingServiceImplTest extends AbstractDataBrokerTest {
     }
 
     private SubmitInstructionInput getMockedSubmitInstructionInput(final String id, final String... dependencyIds) {
-        return getMockedSubmitInstructionInput(id, Optional.<Nanotime> absent(), dependencyIds);
+        return getMockedSubmitInstructionInput(id, Optional.absent(), dependencyIds);
     }
 
     private SubmitInstructionInput getMockedSubmitInstructionInput(final String id, final Optional<Nanotime> deadline, final String... dependencyIds) {