From 1f5efaae42410b857ef308923e0fe79b5917926c Mon Sep 17 00:00:00 2001 From: Gary Wu Date: Mon, 4 Jan 2016 11:52:54 -0800 Subject: [PATCH] Remove unnecessary casts Change-Id: I427e1ea726991d32810dc191e276114c556eff29 Signed-off-by: Gary Wu --- .../messages/cohort3pc/ThreePhaseCommitCohortMessagesTest.java | 2 +- .../protobuff/messages/common/NormalizedNodeMessagesTest.java | 2 +- .../datachange/notification/DataChangeListenerMessagesTest.java | 2 +- .../protobuff/messages/persistent/PersistentMessagesTest.java | 2 +- .../messages/registration/ListenerRegistrationMessagesTest.java | 2 +- .../protobuff/messages/shard/ShardManagerMessagesTest.java | 2 +- .../messages/transaction/ShardTransactionMessagesTest.java | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/protobuff/messages/cohort3pc/ThreePhaseCommitCohortMessagesTest.java b/opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/protobuff/messages/cohort3pc/ThreePhaseCommitCohortMessagesTest.java index a01ccb88c7..6c988b9ce7 100644 --- a/opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/protobuff/messages/cohort3pc/ThreePhaseCommitCohortMessagesTest.java +++ b/opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/protobuff/messages/cohort3pc/ThreePhaseCommitCohortMessagesTest.java @@ -39,7 +39,7 @@ public class ThreePhaseCommitCohortMessagesTest extends AbstractMessagesTest { ThreePhaseCommitCohortMessages.CanCommitTransactionReply.newBuilder(); builder.setCanCommit(true); - writeToFile((com.google.protobuf.GeneratedMessage.Builder) builder); + writeToFile(builder); // Here we will read from the just serialized data diff --git a/opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/protobuff/messages/common/NormalizedNodeMessagesTest.java b/opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/protobuff/messages/common/NormalizedNodeMessagesTest.java index c68eceace4..d87341407b 100644 --- a/opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/protobuff/messages/common/NormalizedNodeMessagesTest.java +++ b/opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/protobuff/messages/common/NormalizedNodeMessagesTest.java @@ -36,7 +36,7 @@ public class NormalizedNodeMessagesTest extends AbstractMessagesTest { builder.setName("test"); builder.setType("fake"); builder.setValue("testValue"); - writeToFile((com.google.protobuf.GeneratedMessage.Builder) builder); + writeToFile(builder); NormalizedNodeMessages.Attribute attributeNew = (NormalizedNodeMessages.Attribute) readFromFile(NormalizedNodeMessages.Attribute.PARSER); diff --git a/opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/protobuff/messages/datachange/notification/DataChangeListenerMessagesTest.java b/opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/protobuff/messages/datachange/notification/DataChangeListenerMessagesTest.java index e9339286f9..e4dbae25c0 100644 --- a/opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/protobuff/messages/datachange/notification/DataChangeListenerMessagesTest.java +++ b/opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/protobuff/messages/datachange/notification/DataChangeListenerMessagesTest.java @@ -52,7 +52,7 @@ public class DataChangeListenerMessagesTest extends AbstractMessagesTest { DataChangeListenerMessages.DataChanged.newBuilder(); builder.addRemovedPaths(expectedOne); - writeToFile((com.google.protobuf.GeneratedMessage.Builder) builder); + writeToFile(builder); DataChangeListenerMessages.DataChanged dataChangedNew = (DataChangeListenerMessages.DataChanged) readFromFile(DataChangeListenerMessages.DataChanged.PARSER); diff --git a/opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/protobuff/messages/persistent/PersistentMessagesTest.java b/opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/protobuff/messages/persistent/PersistentMessagesTest.java index a8ade30099..663cc80314 100644 --- a/opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/protobuff/messages/persistent/PersistentMessagesTest.java +++ b/opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/protobuff/messages/persistent/PersistentMessagesTest.java @@ -54,7 +54,7 @@ public class PersistentMessagesTest extends AbstractMessagesTest { builder.setType("test"); builder.setPath(expectedOne); - writeToFile((com.google.protobuf.GeneratedMessage.Builder) builder); + writeToFile(builder); PersistentMessages.Modification modificationNew = (PersistentMessages.Modification) readFromFile(PersistentMessages.Modification.PARSER); diff --git a/opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/protobuff/messages/registration/ListenerRegistrationMessagesTest.java b/opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/protobuff/messages/registration/ListenerRegistrationMessagesTest.java index 1d50872a66..e253fa22a3 100644 --- a/opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/protobuff/messages/registration/ListenerRegistrationMessagesTest.java +++ b/opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/protobuff/messages/registration/ListenerRegistrationMessagesTest.java @@ -37,7 +37,7 @@ public class ListenerRegistrationMessagesTest extends AbstractMessagesTest { ListenerRegistrationMessages.RegisterChangeListenerReply.newBuilder(); builder.setListenerRegistrationPath(testListenerRegistrationPath); - writeToFile((com.google.protobuf.GeneratedMessage.Builder) builder); + writeToFile(builder); ListenerRegistrationMessages.RegisterChangeListenerReply rclrNew = (ListenerRegistrationMessages.RegisterChangeListenerReply) readFromFile(ListenerRegistrationMessages.RegisterChangeListenerReply.PARSER); diff --git a/opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/protobuff/messages/shard/ShardManagerMessagesTest.java b/opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/protobuff/messages/shard/ShardManagerMessagesTest.java index 45dcd12d05..2e73fdcbdf 100644 --- a/opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/protobuff/messages/shard/ShardManagerMessagesTest.java +++ b/opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/protobuff/messages/shard/ShardManagerMessagesTest.java @@ -34,7 +34,7 @@ public class ShardManagerMessagesTest extends AbstractMessagesTest { ShardManagerMessages.FindPrimary.newBuilder(); builder.setShardName("Inventory"); - writeToFile((com.google.protobuf.GeneratedMessage.Builder) builder); + writeToFile(builder); // Here we will read the same and check we got back what we had saved diff --git a/opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/protobuff/messages/transaction/ShardTransactionMessagesTest.java b/opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/protobuff/messages/transaction/ShardTransactionMessagesTest.java index 6b538dab0d..e2b49e76b6 100644 --- a/opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/protobuff/messages/transaction/ShardTransactionMessagesTest.java +++ b/opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/protobuff/messages/transaction/ShardTransactionMessagesTest.java @@ -51,7 +51,7 @@ public class ShardTransactionMessagesTest extends AbstractMessagesTest { instanceIdentifierBuilder.build(); builder.setInstanceIdentifierPathArguments(expectedOne); - writeToFile((com.google.protobuf.GeneratedMessage.Builder) builder); + writeToFile(builder); // Here we will read the same and check we got back what we had saved ShardTransactionMessages.ReadData readDataNew = -- 2.36.6