Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 187103 Details for
Bug 136091
Cannot access Javadoc location over http
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed fix
patch_136091.txt (text/plain), 2.25 KB, created by
Olivier Thomann
on 2011-01-19 08:58:06 EST
(
hide
)
Description:
Proposed fix
Filename:
MIME Type:
Creator:
Olivier Thomann
Created:
2011-01-19 08:58:06 EST
Size:
2.25 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: model/org/eclipse/jdt/internal/core/JavaElement.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaElement.java,v >retrieving revision 1.140 >diff -u -r1.140 JavaElement.java >--- model/org/eclipse/jdt/internal/core/JavaElement.java 18 Jan 2011 09:36:56 -0000 1.140 >+++ model/org/eclipse/jdt/internal/core/JavaElement.java 19 Jan 2011 13:56:22 -0000 >@@ -14,6 +14,8 @@ > import java.io.FileNotFoundException; > import java.io.IOException; > import java.io.InputStream; >+import java.lang.reflect.InvocationTargetException; >+import java.lang.reflect.Method; > import java.net.JarURLConnection; > import java.net.MalformedURLException; > import java.net.ProtocolException; >@@ -733,9 +735,27 @@ > try { > URL docUrl = new URL(docUrlValue); > URLConnection connection = docUrl.openConnection(); >- String timeoutVal = "10000"; //$NON-NLS-1$ >- System.setProperty("sun.net.client.defaultConnectTimeout", timeoutVal); //$NON-NLS-1$ >- System.setProperty("sun.net.client.defaultReadTimeout", timeoutVal); //$NON-NLS-1$ >+ Class[] parameterTypes = new Class[]{int.class}; >+ Integer timeoutVal = new Integer(10000); >+ // set the connect and read timeouts using reflection since these methods are not available in java 1.4 >+ Class URLClass = connection.getClass(); >+ try { >+ Method connectTimeoutMethod = URLClass.getDeclaredMethod("setConnectTimeout", parameterTypes); //$NON-NLS-1$ >+ Method readTimeoutMethod = URLClass.getDeclaredMethod("setReadTimeout", parameterTypes); //$NON-NLS-1$ >+ connectTimeoutMethod.invoke(connection, new Object[]{timeoutVal}); >+ readTimeoutMethod.invoke(connection, new Object[]{timeoutVal}); >+ } catch (SecurityException e) { >+ // ignore >+ } catch (IllegalArgumentException e) { >+ // ignore >+ } catch (NoSuchMethodException e) { >+ // ignore >+ } catch (IllegalAccessException e) { >+ // ignore >+ } catch (InvocationTargetException e) { >+ // ignore >+ } >+ > if (connection instanceof JarURLConnection) { > connection2 = (JarURLConnection) connection; > // https://bugs.eclipse.org/bugs/show_bug.cgi?id=156307
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 136091
:
186615
|
186980
|
187079
| 187103