Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2018-02-07 18:23:16 +0000
committerAlexander Kurtakov2018-02-07 18:23:16 +0000
commitf9959fe40ae5943210c66dc0d0fd0aad14f2766f (patch)
tree87c375e1871f6de8505ba2fa753881fa884a809c
parent9f2a9d2fb6a39c9e7b82eac18746ec17de6d8148 (diff)
downloadeclipse.platform.team-f9959fe40ae5943210c66dc0d0fd0aad14f2766f.tar.gz
eclipse.platform.team-f9959fe40ae5943210c66dc0d0fd0aad14f2766f.tar.xz
eclipse.platform.team-f9959fe40ae5943210c66dc0d0fd0aad14f2766f.zip
Remove useless casts.
Change-Id: I68499b9ac1017b4cca1b9ed10e26935b30ff1233 Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/FuzzFactorAction.java5
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/IgnoreLeadingPathSegmentsAction.java3
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/RestoreRemovedItemsAction.java4
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ReversePatchAction.java5
4 files changed, 7 insertions, 10 deletions
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/FuzzFactorAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/FuzzFactorAction.java
index d9260ce2b..8c33f6889 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/FuzzFactorAction.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/FuzzFactorAction.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010 IBM Corporation and others.
+ * Copyright (c) 2010, 2018 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -40,8 +40,7 @@ public class FuzzFactorAction extends Action {
int oldValue = subscriber.getPatcher().getFuzz();
int newValue = dialog.getFuzzFactor();
if (newValue != oldValue) {
- SubscriberDiffTreeEventHandler handler = (SubscriberDiffTreeEventHandler) context
- .getAdapter(SubscriberDiffTreeEventHandler.class);
+ SubscriberDiffTreeEventHandler handler = context.getAdapter(SubscriberDiffTreeEventHandler.class);
handler.reset();
subscriber.getPatcher().setFuzz(newValue);
participant.refresh(configuration.getSite().getWorkbenchSite(),
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/IgnoreLeadingPathSegmentsAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/IgnoreLeadingPathSegmentsAction.java
index 56e749652..818b37ad6 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/IgnoreLeadingPathSegmentsAction.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/IgnoreLeadingPathSegmentsAction.java
@@ -68,8 +68,7 @@ public class IgnoreLeadingPathSegmentsAction extends Action {
if (newValue != oldValue) {
DiffTree tree = (DiffTree)context.getDiffTree();
tree.clear();
- SubscriberDiffTreeEventHandler handler = (SubscriberDiffTreeEventHandler) context
- .getAdapter(SubscriberDiffTreeEventHandler.class);
+ SubscriberDiffTreeEventHandler handler = context.getAdapter(SubscriberDiffTreeEventHandler.class);
handler.reset();
subscriber.getPatcher().setStripPrefixSegments(newValue);
participant.refresh(configuration.getSite().getWorkbenchSite(),
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/RestoreRemovedItemsAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/RestoreRemovedItemsAction.java
index 2a9162a08..e82999dc6 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/RestoreRemovedItemsAction.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/RestoreRemovedItemsAction.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2007, 2018 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -29,7 +29,7 @@ public class RestoreRemovedItemsAction extends ResourceModelParticipantAction {
ISynchronizationContext context = getSynchronizationContext();
if(context instanceof SubscriberMergeContext){
SubscriberMergeContext smc = (SubscriberMergeContext) context;
- SubscriberDiffTreeEventHandler handler = (SubscriberDiffTreeEventHandler) smc.getAdapter(SubscriberDiffTreeEventHandler.class);
+ SubscriberDiffTreeEventHandler handler = smc.getAdapter(SubscriberDiffTreeEventHandler.class);
handler.reset();
}
super.run();
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ReversePatchAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ReversePatchAction.java
index 005868aef..21e71699a 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ReversePatchAction.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ReversePatchAction.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2015 IBM Corporation and others.
+ * Copyright (c) 2010, 2018 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -42,8 +42,7 @@ public class ReversePatchAction extends Action {
boolean oldValue = subscriber.getPatcher().isReversed();
subscriber.getPatcher().setReversed(!oldValue);
- SubscriberDiffTreeEventHandler handler = (SubscriberDiffTreeEventHandler) context
- .getAdapter(SubscriberDiffTreeEventHandler.class);
+ SubscriberDiffTreeEventHandler handler = context.getAdapter(SubscriberDiffTreeEventHandler.class);
handler.reset();
participant.refresh(configuration.getSite().getWorkbenchSite(), context
.getScope().getMappings());

Back to the top