Clean up instance checks and casts
[openflowplugin.git] / openflowplugin-impl / src / main / java / org / opendaylight / openflowplugin / impl / services / singlelayer / SingleLayerAggregateFlowMultipartService.java
index e118a7f1078f976e72cd712ce90057a0ceaafc05..cb24aa446b555999001d096a104bb614c6306fe4 100644 (file)
@@ -66,8 +66,7 @@ public class SingleLayerAggregateFlowMultipartService
                                         .filter(MultipartReplyFlowAggregateStats.class::isInstance)
                                         .map(multipartReplyBody ->
                                                 new AggregatedFlowStatisticsBuilder(
-                                                        MultipartReplyFlowAggregateStats.class
-                                                        .cast(multipartReplyBody))
+                                                    (MultipartReplyFlowAggregateStats) multipartReplyBody)
                                                         .build())
                                         .collect(Collectors.toList())))
                         .build();