Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Goldthorpe2011-09-22 22:41:40 +0000
committerChris Goldthorpe2011-09-22 22:41:40 +0000
commite6219a4b731ec3cb308bc7103c9f4069c4c69f12 (patch)
tree965585a758b2d6030fb376c6d4f64291e4e725d3 /org.eclipse.ua.tests/help
parentb06bb6f49deeb16c60de022520a4bef8f8a62cb2 (diff)
downloadeclipse.platform.ua-e6219a4b731ec3cb308bc7103c9f4069c4c69f12.tar.gz
eclipse.platform.ua-e6219a4b731ec3cb308bc7103c9f4069c4c69f12.tar.xz
eclipse.platform.ua-e6219a4b731ec3cb308bc7103c9f4069c4c69f12.zip
Bug 358676 - [Test] Remove unnecessary reflection code in
org.eclipse.ua.tests
Diffstat (limited to 'org.eclipse.ua.tests/help')
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/util/LoadServletUtil.java16
1 files changed, 3 insertions, 13 deletions
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/util/LoadServletUtil.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/util/LoadServletUtil.java
index e787e2d66..9d56cb243 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/util/LoadServletUtil.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/util/LoadServletUtil.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * Copyright (c) 2009, 2011 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
@@ -12,7 +12,6 @@
package org.eclipse.ua.tests.help.util;
import java.io.InputStream;
-import java.lang.reflect.Method;
import java.net.URL;
import java.net.URLConnection;
@@ -82,17 +81,8 @@ public class LoadServletUtil {
}
private static void setTimeout(URLConnection conn, int milliseconds) {
- Class conClass = conn.getClass();
- try {
- Method timeoutMethod = conClass.getMethod(
- "setConnectTimeout", new Class[]{ int.class } ); //$NON-NLS-1$
- timeoutMethod.invoke(conn, new Object[] { new Integer(milliseconds)} );
- Method readMethod = conClass.getMethod(
- "setReadTimeout", new Class[]{ int.class } ); //$NON-NLS-1$
- readMethod.invoke(conn, new Object[] { new Integer(milliseconds)} );
- } catch (Exception e) {
- // If running on a 1.4 JRE an exception is expected, fall through
- }
+ conn.setConnectTimeout(milliseconds);
+ conn.setReadTimeout(milliseconds);
}
}

Back to the top