Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomasz Zarna2010-02-25 10:22:34 +0000
committerTomasz Zarna2010-02-25 10:22:34 +0000
commita5661be0477e50c55ee08e7691f0a5c72d484b84 (patch)
tree1532aba5820b7b9e2c325af150d75d428d511bf3 /tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/CreatePatchTest.java
parent5e5b41b0859bacbc0c80fd0a25530dd45d5a8d22 (diff)
downloadeclipse.platform.team-a5661be0477e50c55ee08e7691f0a5c72d484b84.tar.gz
eclipse.platform.team-a5661be0477e50c55ee08e7691f0a5c72d484b84.tar.xz
eclipse.platform.team-a5661be0477e50c55ee08e7691f0a5c72d484b84.zip
bug 302163: [Sync View] Error message during update operation after synchronization
Diffstat (limited to 'tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/CreatePatchTest.java')
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/CreatePatchTest.java41
1 files changed, 4 insertions, 37 deletions
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/CreatePatchTest.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/CreatePatchTest.java
index 43a07c5ed..975f841a3 100644
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/CreatePatchTest.java
+++ b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/CreatePatchTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009, 2010 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
@@ -14,7 +14,6 @@ import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
-import java.lang.reflect.InvocationTargetException;
import java.net.URL;
import junit.framework.Test;
@@ -241,47 +240,15 @@ public class CreatePatchTest extends EclipseTest {
}
private Text getText(Object object, String name) {
- return (Text) getField(object, name);
+ return (Text) ReflectionUtils.getField(object, name);
}
private Button getButton(Object object, String name) {
- return (Button) getField(object, name);
- }
-
- private Object getField(Object object, String name) {
- Object ret = null;
- try {
- ret = ReflectionUtils.getField(object, name);
- } catch (IllegalArgumentException e) {
- fail(e.getMessage());
- } catch (SecurityException e) {
- fail(e.getMessage());
- } catch (IllegalAccessException e) {
- fail(e.getMessage());
- } catch (NoSuchFieldException e) {
- fail(e.getMessage());
- }
- return ret;
+ return (Button) ReflectionUtils.getField(object, name);
}
private Object callMethod(Object object, String name) {
- return callMethod(object, name, new Object[] {});
- }
-
- private Object callMethod(Object object, String name, Object args[]) {
- Object ret = null;
- try {
- ret = ReflectionUtils.callMethod(object, name, args);
- } catch (IllegalArgumentException e) {
- fail(e.getMessage());
- } catch (IllegalAccessException e) {
- fail(e.getMessage());
- } catch (InvocationTargetException e) {
- fail(e.getMessage());
- } catch (NoSuchMethodException e) {
- fail(e.getMessage());
- }
- return ret;
+ return ReflectionUtils.callMethod(object, name, new Object[] {});
}
private Shell getShell() {

Back to the top