Lines 1-5
Link Here
|
1 |
/******************************************************************************* |
1 |
/******************************************************************************* |
2 |
* Copyright (c) 2000, 2010 IBM Corporation and others. |
2 |
* Copyright (c) 2000, 2011 IBM Corporation and others. |
3 |
* All rights reserved. This program and the accompanying materials |
3 |
* All rights reserved. This program and the accompanying materials |
4 |
* are made available under the terms of the Eclipse Public License v1.0 |
4 |
* are made available under the terms of the Eclipse Public License v1.0 |
5 |
* which accompanies this distribution, and is available at |
5 |
* which accompanies this distribution, and is available at |
Lines 18-23
Link Here
|
18 |
import java.net.MalformedURLException; |
18 |
import java.net.MalformedURLException; |
19 |
import java.net.ProtocolException; |
19 |
import java.net.ProtocolException; |
20 |
import java.net.SocketException; |
20 |
import java.net.SocketException; |
|
|
21 |
import java.net.SocketTimeoutException; |
21 |
import java.net.URL; |
22 |
import java.net.URL; |
22 |
import java.net.URLConnection; |
23 |
import java.net.URLConnection; |
23 |
import java.net.UnknownHostException; |
24 |
import java.net.UnknownHostException; |
Lines 732-737
Link Here
|
732 |
try { |
733 |
try { |
733 |
URL docUrl = new URL(docUrlValue); |
734 |
URL docUrl = new URL(docUrlValue); |
734 |
URLConnection connection = docUrl.openConnection(); |
735 |
URLConnection connection = docUrl.openConnection(); |
|
|
736 |
connection.setReadTimeout(5000); |
735 |
if (connection instanceof JarURLConnection) { |
737 |
if (connection instanceof JarURLConnection) { |
736 |
connection2 = (JarURLConnection) connection; |
738 |
connection2 = (JarURLConnection) connection; |
737 |
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=156307 |
739 |
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=156307 |
Lines 780-785
Link Here
|
780 |
return new String(contents); |
782 |
return new String(contents); |
781 |
} |
783 |
} |
782 |
} |
784 |
} |
|
|
785 |
} catch (SocketTimeoutException e) { |
786 |
throw new JavaModelException(new JavaModelStatus(IJavaModelStatusConstants.CANNOT_RETRIEVE_ATTACHED_JAVADOC_TIMEOUT, this)); |
783 |
} catch (MalformedURLException e) { |
787 |
} catch (MalformedURLException e) { |
784 |
throw new JavaModelException(new JavaModelStatus(IJavaModelStatusConstants.CANNOT_RETRIEVE_ATTACHED_JAVADOC, this)); |
788 |
throw new JavaModelException(new JavaModelStatus(IJavaModelStatusConstants.CANNOT_RETRIEVE_ATTACHED_JAVADOC, this)); |
785 |
} catch (FileNotFoundException e) { |
789 |
} catch (FileNotFoundException e) { |