Remove redundant type declarations 79/76879/6
authorStephen Kitt <skitt@redhat.com>
Thu, 11 Oct 2018 10:47:47 +0000 (12:47 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Wed, 9 Jan 2019 11:20:10 +0000 (12:20 +0100)
Type inference improved since we wrote this code, hence we can
ditch the explicit types.

Change-Id: I44ae2c841820b6e8e4b05d06b45d9123c7b6db70
Signed-off-by: Stephen Kitt <skitt@redhat.com>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
17 files changed:
binding/mdsal-binding-dom-codec/src/test/java/org/opendaylight/mdsal/binding/dom/codec/test/AugmentationSubstitutionTest.java
binding/mdsal-binding-dom-codec/src/test/java/org/opendaylight/mdsal/binding/dom/codec/test/CachingCodecTest.java
binding/mdsal-binding-dom-codec/src/test/java/org/opendaylight/mdsal/binding/dom/codec/test/CaseSubstitutionTest.java
binding/mdsal-binding-dom-codec/src/test/java/org/opendaylight/mdsal/binding/dom/codec/test/EmptyLeafTest.java
binding/mdsal-binding-dom-codec/src/test/java/org/opendaylight/mdsal/binding/dom/codec/test/NormalizedNodeSerializeDeserializeTest.java
binding/mdsal-binding-generator-impl/src/main/java/org/opendaylight/mdsal/binding/yang/types/AbstractTypeProvider.java
binding/mdsal-binding-generator-impl/src/test/java/org/opendaylight/mdsal/binding/generator/util/YangSchemaUtilsTest.java
binding/mdsal-binding-generator-util/src/main/java/org/opendaylight/mdsal/binding/model/util/generated/type/builder/AnnotationTypeBuilderImpl.java
binding/mdsal-binding-java-api-generator/src/main/java/org/opendaylight/mdsal/binding/java/api/generator/AbstractRangeGenerator.java
binding/yang-binding/src/main/java/org/opendaylight/yangtools/yang/binding/InstanceIdentifierBuilderImpl.java
binding2/mdsal-binding2-generator-impl/src/main/java/org/opendaylight/mdsal/binding/javav2/generator/yang/types/TypeGenHelper.java
binding2/mdsal-binding2-java-api-generator/src/main/java/org/opendaylight/mdsal/binding/javav2/java/api/generator/renderers/UnionRenderer.java
binding2/mdsal-binding2-spec/src/main/java/org/opendaylight/mdsal/binding/javav2/spec/base/InstanceIdentifier.java
dom/mdsal-dom-broker/src/test/java/org/opendaylight/mdsal/dom/broker/ShardedDOMDataTreeListenerTest.java
dom/mdsal-dom-broker/src/test/java/org/opendaylight/mdsal/dom/broker/ShardedDOMDataTreeListenerWithProducerTest.java
dom/mdsal-dom-broker/src/test/java/org/opendaylight/mdsal/dom/broker/ShardedDOMDataTreeProducerSingleShardTest.java
dom/mdsal-dom-broker/src/test/java/org/opendaylight/mdsal/dom/broker/TestCommitCohort.java

index 5293c78785c4d218f6acdbe00d1892e3c44cb1bc..144a5b4d9a0a26eb7e3b2a84e47289fb2e173898 100644 (file)
@@ -18,7 +18,6 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsal.te
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsal.test.augment.rev140709.TreeComplexUsesAugmentBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsal.test.augment.rev140709.TreeLeafOnlyAugment;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsal.test.augment.rev140709.complex.from.grouping.ContainerWithUsesBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsal.test.augment.rev140709.complex.from.grouping.ListViaUses;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsal.test.binding.rev140701.Top;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsal.test.binding.rev140701.two.level.list.TopLevelList;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsal.test.binding.rev140701.two.level.list.TopLevelListBuilder;
@@ -75,7 +74,7 @@ public class AugmentationSubstitutionTest extends AbstractBindingCodecTest {
                 .setContainerWithUses(new ContainerWithUsesBuilder()
                     .setLeafFromGrouping("foo")
                     .build())
-                .setListViaUses(Collections.<ListViaUses>emptyList())
+                .setListViaUses(Collections.emptyList())
                 .build();
     }
 }
index 069a4d024b84194d2c5a36ae33c2e07ffdce1257..03d5d7c1964a7c4b4ab0e574d7c1ffdc508b73a8 100644 (file)
@@ -111,7 +111,7 @@ public class CachingCodecTest extends AbstractBindingCodecTest {
     @SafeVarargs
     private final BindingNormalizedNodeCachingCodec<Top> createCachingCodec(
             final Class<? extends DataObject>... classes) {
-        return topNode.createCachingCodec(ImmutableSet.<Class<? extends DataObject>>copyOf(classes));
+        return topNode.createCachingCodec(ImmutableSet.copyOf(classes));
     }
 
     private static void verifyListItemSame(final NormalizedNode<?, ?> firstTop, final NormalizedNode<?, ?> secondTop) {
index 2262e8c71ccd744f88552c1622ebc62bfc39e80b..d379eb109035bbe88eee654a15ccd9648f24fb5c 100644 (file)
@@ -16,7 +16,6 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsal.te
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsal.test.augment.rev140709.TreeComplexUsesAugment;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsal.test.augment.rev140709.TreeLeafOnlyAugment;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsal.test.augment.rev140709.complex.from.grouping.ContainerWithUsesBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsal.test.augment.rev140709.complex.from.grouping.ListViaUses;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsal.test.augment.rev140709.put.top.input.choice.list.choice.in.choice.list.ComplexViaUsesBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsal.test.augment.rev140709.top.choice.list.choice.in.choice.list.ComplexViaUsesWithDifferentNameBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsal.test.binding.rev140701.Top;
@@ -64,7 +63,7 @@ public class CaseSubstitutionTest extends AbstractBindingCodecTest {
         .setContainerWithUses(new ContainerWithUsesBuilder()
             .setLeafFromGrouping("foo")
         .build())
-        .setListViaUses(Collections.<ListViaUses>emptyList())
+        .setListViaUses(Collections.emptyList())
         .build();
     }
 
index b04b251bc600aa8506324c4e0c0c561e7f73d8e1..1604858975bebb89e21a36275471ca1503f49b19 100644 (file)
@@ -17,7 +17,6 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsal.te
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsal.test.augment.rev140709.TreeComplexUsesAugment;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsal.test.augment.rev140709.TreeLeafOnlyAugment;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsal.test.augment.rev140709.complex.from.grouping.ContainerWithUsesBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsal.test.augment.rev140709.complex.from.grouping.ListViaUses;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsal.test.augment.rev140709.top.top.level.list.choice.in.list.EmptyLeaf;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsal.test.augment.rev140709.top.top.level.list.choice.in.list.EmptyLeafBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsal.test.binding.rev140701.Top;
@@ -62,7 +61,7 @@ public class EmptyLeafTest extends AbstractBindingCodecTest {
         .setContainerWithUses(new ContainerWithUsesBuilder()
             .setLeafFromGrouping("foo")
         .build())
-        .setListViaUses(Collections.<ListViaUses>emptyList())
+        .setListViaUses(Collections.emptyList())
         .build();
     }
 
index 6d7d88271c7729e1cd6fdf3e5221ce04025c54a0..c2fc6cf0749112b27fb08b94a369689f6b940e75 100644 (file)
@@ -231,7 +231,7 @@ public class NormalizedNodeSerializeDeserializeTest extends AbstractBindingCodec
         for (Entry<Class<? extends Augmentation<Top>>, ? extends Augmentation<Top>> augment : augments.entrySet()) {
             topBuilder.addAugmentation(augment.getKey(), augment.getValue());
         }
-        return topBuilder.setTopLevelList(Collections.<TopLevelList>emptyList()).build();
+        return topBuilder.setTopLevelList(Collections.emptyList()).build();
     }
 
     @Test
index 0d1ddac048e30a71690e1adc66a0a43e8d526399..f9e1abb9fb961daa2b59eaa3e13cd0389b67ac08 100644 (file)
@@ -278,7 +278,7 @@ public abstract class AbstractTypeProvider implements TypeProvider {
         } else {
             leafRefValueNode = SchemaContextUtil.findDataSchemaNode(schemaContext, parentModule, leafRefStrippedXPath);
         }
-        return leafRefValueNode != null ? leafRefValueNode.equals(parentNode) : false;
+        return leafRefValueNode != null && leafRefValueNode.equals(parentNode);
     }
 
     /**
@@ -547,9 +547,7 @@ public abstract class AbstractTypeProvider implements TypeProvider {
     private static boolean leafContainsEnumDefinition(final SchemaNode dataNode) {
         if (dataNode instanceof LeafSchemaNode) {
             final LeafSchemaNode leaf = (LeafSchemaNode) dataNode;
-            if (CompatUtils.compatLeafType(leaf) instanceof EnumTypeDefinition) {
-                return true;
-            }
+            return CompatUtils.compatLeafType(leaf) instanceof EnumTypeDefinition;
         }
         return false;
     }
@@ -569,9 +567,7 @@ public abstract class AbstractTypeProvider implements TypeProvider {
     private static boolean leafListContainsEnumDefinition(final SchemaNode dataNode) {
         if (dataNode instanceof LeafListSchemaNode) {
             final LeafListSchemaNode leafList = (LeafListSchemaNode) dataNode;
-            if (leafList.getType() instanceof EnumTypeDefinition) {
-                return true;
-            }
+            return leafList.getType() instanceof EnumTypeDefinition;
         }
         return false;
     }
@@ -720,7 +716,7 @@ public abstract class AbstractTypeProvider implements TypeProvider {
         for (Module module : modulesSortedByDependency) {
             Map<Optional<Revision>, Map<String, Type>> dateTypeMap = genTypeDefsContextMap.computeIfAbsent(
                 module.getName(), key -> new HashMap<>());
-            dateTypeMap.put(module.getRevision(), Collections.<String, Type>emptyMap());
+            dateTypeMap.put(module.getRevision(), Collections.emptyMap());
             genTypeDefsContextMap.put(module.getName(), dateTypeMap);
         }
 
index 9f3a17bc6d23f502cc020a8c00f2fe4958678680..e7fc83f82fddab2a313a1fe3702ce660c7bc8f2e 100644 (file)
@@ -92,7 +92,7 @@ public class YangSchemaUtilsTest {
         doReturn(Optional.of(container)).when(context).findModule(any(QNameModule.class));
 
         final DataSchemaNode node = mock(DataSchemaNode.class);
-        doReturn(node).when(container).getDataChildByName((QName) any());
+        doReturn(node).when(container).getDataChildByName(any());
         final TypeDefinition<?> typeDefinition = mock(TypeDefinition.class);
         doReturn(Q_NAME).when(typeDefinition).getQName();
         doReturn(ImmutableSet.of(typeDefinition)).when(container).getTypeDefinitions();
@@ -107,16 +107,16 @@ public class YangSchemaUtilsTest {
 
         final DataNodeContainer dataNode =
                 mock(DataNodeContainer.class, withSettings().extraInterfaces(DataSchemaNode.class));
-        doReturn(dataNode).when(container).getDataChildByName((QName) any());
+        doReturn(dataNode).when(container).getDataChildByName(any());
         doReturn(ImmutableSet.of(typeDefinition)).when(dataNode).getTypeDefinitions();
         assertEquals(typeDefinition, YangSchemaUtils.findTypeDefinition(context,
             SchemaPath.create(false, Q_NAME, Q_NAME)));
 
         final ChoiceSchemaNode choiceNode =
                 mock(ChoiceSchemaNode.class, withSettings().extraInterfaces(DataSchemaNode.class));
-        doReturn(choiceNode).when(container).getDataChildByName((QName) any());
+        doReturn(choiceNode).when(container).getDataChildByName(any());
         final CaseSchemaNode caseNode = mock(CaseSchemaNode.class);
-        doReturn(caseNode).when(choiceNode).getCaseNodeByName((QName) any());
+        doReturn(caseNode).when(choiceNode).getCaseNodeByName(any());
         doReturn(ImmutableSet.of(typeDefinition)).when(caseNode).getTypeDefinitions();
         assertEquals(typeDefinition, YangSchemaUtils.findTypeDefinition(context,
             SchemaPath.create(false, Q_NAME, Q_NAME, Q_NAME)));
index c4e81481b216fdce6e80bcd33124f8cf110fd7e0..6849be94cd5adb5ee1bc7587874dd7608c9a8d68 100644 (file)
@@ -125,8 +125,7 @@ final class AnnotationTypeBuilderImpl extends AbstractBaseType implements Annota
             }
             this.paramNames = ImmutableList.copyOf(p);
 
-            this.parameters = parameters.isEmpty() ? Collections.<AnnotationType.Parameter>emptyList()
-                    : Collections.unmodifiableList(parameters);
+            this.parameters = parameters.isEmpty() ? Collections.emptyList() : Collections.unmodifiableList(parameters);
         }
 
         @Override
index fee91319c48589294716d069afadddee892d8320..c23782d89b089e4d3aa2651c0e60d3a45ef27d84 100644 (file)
@@ -29,7 +29,7 @@ abstract class AbstractRangeGenerator<T extends Number & Comparable<T>> {
     }
 
     static {
-        final Builder<String, AbstractRangeGenerator<?>> b = ImmutableMap.<String, AbstractRangeGenerator<?>>builder();
+        final Builder<String, AbstractRangeGenerator<?>> b = ImmutableMap.builder();
         addGenerator(b, new ByteRangeGenerator());
         addGenerator(b, new ShortRangeGenerator());
         addGenerator(b, new IntegerRangeGenerator());
index e3fc36ef9847ca25fc9230a0f702761fa1a0f3f1..a099ba571f0edfb0969d08e441ef3e87e723bb65 100644 (file)
@@ -106,10 +106,7 @@ final class InstanceIdentifierBuilderImpl<T extends DataObject> implements Insta
             pathArguments = Iterables.concat(basePath, pathBuilder.build());
         }
 
-        @SuppressWarnings("unchecked")
-        final InstanceIdentifier<T> ret = (InstanceIdentifier<T>) InstanceIdentifier.trustedCreate(arg, pathArguments,
-            hashBuilder.build(), wildcard);
-        return ret;
+        return InstanceIdentifier.trustedCreate(arg, pathArguments, hashBuilder.build(), wildcard);
     }
 
     <N extends DataObject> InstanceIdentifierBuilderImpl<N> addWildNode(final PathArgument newArg) {
index f4a4a36ea6247ee33c608ca1ab3b56eb06649cac..d827fca3d6433a9cf8c851a33cb994601b997628 100755 (executable)
@@ -183,7 +183,8 @@ public final class TypeGenHelper {
         Preconditions.checkNotNull(javaType, "javaType cannot be null");
         final String propertyName = "value";
 
-        final GeneratedTOBuilder genTOBuilder = typedefToTransferObject(basePackageName, typedef, moduleName, context);
+        final GeneratedTOBuilderImpl genTOBuilder = typedefToTransferObject(basePackageName, typedef, moduleName,
+                context);
         genTOBuilder.setRestrictions(BindingGeneratorUtil.getRestrictions(typedef));
         final GeneratedPropertyBuilder genPropBuilder = genTOBuilder.addProperty(propertyName);
         genPropBuilder.setReturnType(javaType);
@@ -198,7 +199,7 @@ public final class TypeGenHelper {
         }
         addUnitsToGenTO(genTOBuilder, typedef.getUnits().orElse(null));
         genTOBuilder.setTypedef(true);
-        makeSerializable((GeneratedTOBuilderImpl) genTOBuilder);
+        makeSerializable(genTOBuilder);
         return genTOBuilder.toInstance();
     }
 
index e298bc6c1594c3a34e9032e521742285e099c270..4d42e3130c87d7d0dba27cca1185fc50374610e3 100644 (file)
@@ -129,8 +129,7 @@ public class UnionRenderer extends ClassRenderer {
         } else if ((retTypeCastProperties == null || retTypeCastProperties.isEmpty())) {
             Preconditions.checkState(typedefType.getSuperType() != null);
 
-            sb.append(generateCharArrayFieldForTypedef(fieldName,
-                    (GeneratedTransferObject) typedefType.getSuperType()));
+            sb.append(generateCharArrayFieldForTypedef(fieldName, typedefType.getSuperType()));
         }
 
         return sb.toString();
@@ -232,7 +231,7 @@ public class UnionRenderer extends ClassRenderer {
 
     @Override
     protected String generateInnerClassBody(GeneratedTransferObject innerClass) {
-        final UnionRenderer unionRenderer = new UnionRenderer((GeneratedTransferObject) innerClass);
+        final UnionRenderer unionRenderer = new UnionRenderer(innerClass);
         final String body = unionRenderer.generateAsInnerClass();
         this.putAllToImportMap(unionRenderer.getImportMap());
         return body;
index bd346dd96cf5823b5957d4b404710f34406041ef..60e2faaf93d5b340ddc43b4714eea099c8fff27a 100644 (file)
@@ -382,7 +382,7 @@ public class InstanceIdentifier<T extends TreeNode> implements Path<InstanceIden
     @Deprecated
     public final List<TreeArgument> getPath() {
         if (legacyCache == null) {
-            legacyCache = ImmutableList.<TreeArgument>copyOf(pathArguments);
+            legacyCache = ImmutableList.copyOf(pathArguments);
         }
 
         return legacyCache;
index f65cdf8c76f078870ab4f6883ca454e57dca067e..07e6383b4d29d82b7ce0fa71a4598b49e18612ba 100644 (file)
@@ -33,7 +33,6 @@ import org.opendaylight.mdsal.dom.api.DOMDataTreeChangeListener;
 import org.opendaylight.mdsal.dom.api.DOMDataTreeIdentifier;
 import org.opendaylight.mdsal.dom.api.DOMDataTreeListener;
 import org.opendaylight.mdsal.dom.api.DOMDataTreeLoopException;
-import org.opendaylight.mdsal.dom.api.DOMDataTreeProducer;
 import org.opendaylight.mdsal.dom.api.DOMDataTreeService;
 import org.opendaylight.mdsal.dom.api.DOMDataTreeShard;
 import org.opendaylight.mdsal.dom.api.DOMDataTreeShardingConflictException;
@@ -100,20 +99,19 @@ public class ShardedDOMDataTreeListenerTest {
 
     @Test(expected = IllegalArgumentException.class)
     public void registerListenerWithEmptySubtrees() throws DOMDataTreeLoopException {
-        treeService.registerListener(listener, Collections.<DOMDataTreeIdentifier>emptyList(), true,
-                Collections.<DOMDataTreeProducer>emptyList());
+        treeService.registerListener(listener, Collections.emptyList(), true, Collections.emptyList());
     }
 
     @Test
     public void registerRootListener() throws DOMDataTreeLoopException {
-        treeService.registerListener(listener, SUBTREES_ROOT, true, Collections.<DOMDataTreeProducer>emptyList());
+        treeService.registerListener(listener, SUBTREES_ROOT, true, Collections.emptyList());
         verify(rootShard, times(1)).registerTreeChangeListener(eq(ROOT_ID.getRootIdentifier()),
                 any(DOMDataTreeChangeListener.class));
     }
 
     @Test
     public void registerTreeListener() throws DOMDataTreeLoopException {
-        treeService.registerListener(listener, SUBTREES_TEST, true, Collections.<DOMDataTreeProducer>emptyList());
+        treeService.registerListener(listener, SUBTREES_TEST, true, Collections.emptyList());
         verify(rootShard, times(1)).registerTreeChangeListener(eq(TEST_ID.getRootIdentifier()),
                 any(DOMDataTreeChangeListener.class));
     }
@@ -121,8 +119,7 @@ public class ShardedDOMDataTreeListenerTest {
     @Test
     public void registerAndCloseListener() throws DOMDataTreeLoopException {
         final ListenerRegistration<DOMDataTreeListener> reg =
-                treeService.registerListener(listener, SUBTREES_TEST, true,
-                        Collections.<DOMDataTreeProducer>emptyList());
+                treeService.registerListener(listener, SUBTREES_TEST, true, Collections.emptyList());
         reg.close();
         verify(storeListenerReg, times(1)).close();
     }
@@ -131,7 +128,7 @@ public class ShardedDOMDataTreeListenerTest {
     public void receiveChangeEvent() throws DOMDataTreeLoopException {
         final ArgumentCaptor<DOMDataTreeChangeListener> storeListener =
                 ArgumentCaptor.forClass(DOMDataTreeChangeListener.class);
-        treeService.registerListener(listener, SUBTREES_TEST, true, Collections.<DOMDataTreeProducer>emptyList());
+        treeService.registerListener(listener, SUBTREES_TEST, true, Collections.emptyList());
         verify(rootShard, times(1)).registerTreeChangeListener(eq(TEST_ID.getRootIdentifier()),
                 storeListener.capture());
 
@@ -139,7 +136,7 @@ public class ShardedDOMDataTreeListenerTest {
                 DataTreeCandidates.fromNormalizedNode(TEST_ID.getRootIdentifier(), TEST_CONTAINER);
         final Collection<DataTreeCandidate> changes = Collections.singleton(sentStoreCandidate);
 
-        doNothing().when(listener).onDataTreeChanged(Mockito.<Collection<DataTreeCandidate>>any(), Mockito.anyMap());
+        doNothing().when(listener).onDataTreeChanged(Mockito.any(), Mockito.anyMap());
         storeListener.getValue().onDataTreeChanged(changes);
 
         final ArgumentCaptor<Collection<DataTreeCandidate>> candidateCapture = captorFor(Collection.class);
index 04ec0122afd6c5591c136e2d2e58a974bb054bc7..ee5c9ebe4cc472e8111d0f57b437aa736667d076 100644 (file)
@@ -157,7 +157,7 @@ public class ShardedDOMDataTreeListenerWithProducerTest {
         final DOMDataTreeListener listener = mock(DOMDataTreeListener.class);
         final ArgumentCaptor<DOMDataTreeChangeListener> storeListener =
                 ArgumentCaptor.forClass(DOMDataTreeChangeListener.class);
-        treeService.registerListener(listener, SUBTREES_TEST, true, Collections.<DOMDataTreeProducer>emptyList());
+        treeService.registerListener(listener, SUBTREES_TEST, true, Collections.emptyList());
         verify(rootShard, times(1)).registerTreeChangeListener(eq(TEST_ID.getRootIdentifier()),
                 storeListener.capture());
 
index 0809cec4f4fa8a14e6ea8c99ff3bad01f08b45f8..ec265c9966110ad2fddfbf3f68bde62cedd0731e 100644 (file)
@@ -96,7 +96,7 @@ public class ShardedDOMDataTreeProducerSingleShardTest {
 
     @Test(expected = IllegalArgumentException.class)
     public void createProducerWithEmptyList() {
-        treeService.createProducer(Collections.<DOMDataTreeIdentifier>emptySet());
+        treeService.createProducer(Collections.emptySet());
     }
 
     @Test(expected = DOMDataTreeProducerBusyException.class)
index 47ffb164f56a48fc16c445873d76681bc9d2eb31..a380cf02aa68e0e4f6bd29d4c31ae806ba56b1b5 100644 (file)
@@ -53,7 +53,7 @@ public enum TestCommitCohort implements DOMStoreThreePhaseCommitCohort {
     }
 
     private static ListenableFuture<Void> immediate(final boolean isSuccess, final Exception except) {
-        return isSuccess ? Futures.<Void>immediateFuture(null) : Futures.<Void>immediateFailedFuture(except);
+        return isSuccess ? Futures.immediateFuture(null) : Futures.immediateFailedFuture(except);
     }