From 526bd08524eeb2b9bd999d3e56969775088ba7a6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Per-=C3=85ke=20Minborg?= Date: Thu, 27 Oct 2016 22:42:59 -0700 Subject: [PATCH] Remove redundant casts Change-Id: I80b73b653e97904605dc62484a7448f3bfbf7211 --- .../java/com/vaadin/event/dd/acceptcriteria/SourceIs.java | 4 ++-- .../com/vaadin/event/dd/acceptcriteria/SourceIsTarget.java | 4 ++-- .../java/com/vaadin/server/communication/ClientRpcWriter.java | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/server/src/main/java/com/vaadin/event/dd/acceptcriteria/SourceIs.java b/server/src/main/java/com/vaadin/event/dd/acceptcriteria/SourceIs.java index 6213501112..eaccceaca2 100644 --- a/server/src/main/java/com/vaadin/event/dd/acceptcriteria/SourceIs.java +++ b/server/src/main/java/com/vaadin/event/dd/acceptcriteria/SourceIs.java @@ -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; diff --git a/server/src/main/java/com/vaadin/event/dd/acceptcriteria/SourceIsTarget.java b/server/src/main/java/com/vaadin/event/dd/acceptcriteria/SourceIsTarget.java index 39fa9cb23e..95fbaab85e 100644 --- a/server/src/main/java/com/vaadin/event/dd/acceptcriteria/SourceIsTarget.java +++ b/server/src/main/java/com/vaadin/event/dd/acceptcriteria/SourceIsTarget.java @@ -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; } diff --git a/server/src/main/java/com/vaadin/server/communication/ClientRpcWriter.java b/server/src/main/java/com/vaadin/server/communication/ClientRpcWriter.java index efa8cc3be9..17043deb7b 100644 --- a/server/src/main/java/com/vaadin/server/communication/ClientRpcWriter.java +++ b/server/src/main/java/com/vaadin/server/communication/ClientRpcWriter.java @@ -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) oldPendingRpc - .get(oldIndex)).compareTo( + && oldPendingRpc + .get(oldIndex).compareTo( paintablePendingRpc.get( paintableIndex)) <= 0)) { pendingInvocations.add(oldPendingRpc.get(oldIndex++)); -- 2.39.5