Bug 237436 - Hovers blocked, because IType#getAttachedJavadoc(..) blocked in Socket#connect(..)
Summary: Hovers blocked, because IType#getAttachedJavadoc(..) blocked in Socket#connec...
Status: CLOSED DUPLICATE of bug 136091
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-17 04:40 EDT by Markus Keller CLA
Modified: 2011-02-04 06:37 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Keller CLA 2008-06-17 04:40:47 EDT
I20080612-2000

I removed the source attachment from an rt.jar, and then hovered over a reference to java.lang.Object from that jar. When no hover appeared, I checked the threads, and found that the Text Viewer Hover Presenter was blocked.

The URL was http://java.sun.com/javase/6/docs/api/java/lang/Object.html .

I checked the firewall, but I didn't find any problem there. In the browser, the URL above worked fine.

I have not found an easy way to add a timeout (except for opening the connection in a separate thread). java.net.URLConnection#setReadTimeout(int) is unfortunately only available in 1.5.

Daemon Thread [Text Viewer Hover Presenter] (Suspended)	
	owns: PlainSocketImpl  (id=151)	
	owns: HttpClient  (id=152)	
	owns: HttpURLConnection  (id=153)	
	PlainSocketImpl.socketConnect(InetAddress, int, int) line: not available [native method]	
	PlainSocketImpl.doConnect(InetAddress, int, int) line: 389	
	PlainSocketImpl.connectToAddress(InetAddress, int, int) line: 250	
	PlainSocketImpl.connect(SocketAddress, int) line: 237	
	Socket.connect(SocketAddress, int) line: 540	
	Socket.connect(SocketAddress) line: 490	
	HttpClient(NetworkClient).doConnect(String, int) line: 180	
	HttpClient.openServer(String, int) line: 403	
	HttpClient.openServer() line: 521	
	HttpClient.<init>(URL, Proxy, int) line: 246	
	HttpClient.New(URL, Proxy, int, boolean) line: 320	
	HttpClient.New(URL, Proxy, int) line: 337	
	HttpURLConnection.getNewHttpClient(URL, Proxy, int) line: 822	
	HttpURLConnection.plainConnect() line: 774	
	HttpURLConnection.connect() line: 699	
	HttpURLConnection.getInputStream() line: 943 [local variables unavailable]	
	ResolvedBinaryType(JavaElement).getURLContents(String) line: 751	
	ResolvedBinaryType(BinaryType).getJavadocContents(IProgressMonitor) line: 1059	
	ResolvedBinaryType(BinaryType).getAttachedJavadoc(IProgressMonitor) line: 971	
	JavadocContentAccess2.getHTMLContent(IMember, boolean, boolean) line: 98	
	JavadocHover.getHoverInfo(IJavaElement[], String, JavadocBrowserInformationControlInput) line: 552	
	JavadocHover.internalGetHoverInfo(ITextViewer, IRegion) line: 509	
	JavadocHover.getHoverInfo2(ITextViewer, IRegion) line: 494	
	BestMatchHover.getHoverInfo2(ITextViewer, IRegion) line: 129	
	JavaEditorTextHoverProxy.getHoverInfo2(ITextViewer, IRegion) line: 82	
	TextViewerHoverManager$4.run() line: 166
Comment 1 Markus Keller CLA 2008-06-17 06:29:54 EDT
I could reproduce this also after I restarted the runtime workbench in which it originally happened. However, I could not reproduce any more after I restarted my computer.

OK to close for now, unless you think there really is a problem in the connection code.
Comment 2 Jerome Lanneluc CLA 2008-06-18 02:36:58 EDT
Olivier, what do you think? Could we improve the connection code?
Comment 3 Olivier Thomann CLA 2008-07-21 14:09:30 EDT
With what we have available as API from the core libraries, there is not much we can do. Maybe we should investigate using the org.apache.commons.httpclient which is available through orbit.
Philippe, any thoughts on this?
Comment 4 Olivier Thomann CLA 2009-03-09 14:38:12 EDT
I think for compatible deltas we are only checking ADDED and CHANGED deltas.
For not compatible deltas, we should also report a problem.
Comment 5 Markus Keller CLA 2011-02-04 06:37:22 EST

*** This bug has been marked as a duplicate of bug 136091 ***