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 187079 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 v2.0
patch136091.txt (text/plain), 2.27 KB, created by
Ayushman Jain
on 2011-01-19 01:47:32 EST
(
hide
)
Description:
proposed fix v2.0
Filename:
MIME Type:
Creator:
Ayushman Jain
Created:
2011-01-19 01:47:32 EST
Size:
2.27 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 06:42:35 -0000 >@@ -14,6 +14,7 @@ > import java.io.FileNotFoundException; > import java.io.IOException; > import java.io.InputStream; >+import java.lang.reflect.Method; > import java.net.JarURLConnection; > import java.net.MalformedURLException; > import java.net.ProtocolException; >@@ -733,9 +734,21 @@ > 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); >+ try { >+ // set the connect and read timeouts using reflection since these methods are not available in java 1.4 >+ Class URLClass = Class.forName("java.net.URLConnection"); //$NON-NLS-1$ >+ 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 (Exception e) { >+ // setConnectTimeout() or setReadTimeout() not found. Set system wide timeout property >+ System.setProperty("sun.net.client.defaultConnectTimeout", timeoutVal.toString()); //$NON-NLS-1$ >+ System.setProperty("sun.net.client.defaultReadTimeout", timeoutVal.toString()); //$NON-NLS-1$ >+ } >+ > 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