]> source.dussan.org Git - vaadin-framework.git/commitdiff
Remove redundant casts
authorPer-Åke Minborg <minborg@speedment.com>
Fri, 28 Oct 2016 05:42:59 +0000 (22:42 -0700)
committerPekka Hyvönen <pekka@vaadin.com>
Wed, 2 Nov 2016 13:10:20 +0000 (13:10 +0000)
Change-Id: I80b73b653e97904605dc62484a7448f3bfbf7211

server/src/main/java/com/vaadin/event/dd/acceptcriteria/SourceIs.java
server/src/main/java/com/vaadin/event/dd/acceptcriteria/SourceIsTarget.java
server/src/main/java/com/vaadin/server/communication/ClientRpcWriter.java

index 6213501112e63d006002439087ac1cabf9ed0905..eaccceaca2ab73dfb562eaa40bc485229dded365 100644 (file)
@@ -63,8 +63,8 @@ public class SourceIs extends ClientSideCriterion {
     @Override
     public boolean accept(DragAndDropEvent dragEvent) {
         if (dragEvent.getTransferable() instanceof TransferableImpl) {
-            Component sourceComponent = ((TransferableImpl) dragEvent
-                    .getTransferable()).getSourceComponent();
+            Component sourceComponent = dragEvent
+                .getTransferable().getSourceComponent();
             for (Component c : components) {
                 if (c == sourceComponent) {
                     return true;
index 39fa9cb23e8acb843273f085387fbb8dc7cbb1ce..95fbaab85e598cf7134c77f437c3ae363480df67 100644 (file)
@@ -46,8 +46,8 @@ public class SourceIsTarget extends ClientSideCriterion {
     @Override
     public boolean accept(DragAndDropEvent dragEvent) {
         if (dragEvent.getTransferable() instanceof TransferableImpl) {
-            Component sourceComponent = ((TransferableImpl) dragEvent
-                    .getTransferable()).getSourceComponent();
+            Component sourceComponent = dragEvent
+                .getTransferable().getSourceComponent();
             DropTarget target = dragEvent.getTargetDetails().getTarget();
             return sourceComponent == target;
         }
index efa8cc3be9fa85119ebce6ee20b21280414e8e82..17043deb7bcd64a7ba3c5779dd74268f872e6307 100644 (file)
@@ -131,8 +131,8 @@ public class ClientRpcWriter implements Serializable {
                 for (int destIndex = 0, oldIndex = 0, paintableIndex = 0; destIndex < totalCalls; destIndex++) {
                     if (paintableIndex >= paintablePendingRpc.size()
                             || (oldIndex < oldPendingRpc.size()
-                                    && ((Comparable<ClientMethodInvocation>) oldPendingRpc
-                                            .get(oldIndex)).compareTo(
+                                    && oldPendingRpc
+                                        .get(oldIndex).compareTo(
                                                     paintablePendingRpc.get(
                                                             paintableIndex)) <= 0)) {
                         pendingInvocations.add(oldPendingRpc.get(oldIndex++));