Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 337146

Summary: Git clone wizard hangs if clipboard contains corrupt URI
Product: [Technology] EGit Reporter: Jens Baumgart <jens.baumgart>
Component: UIAssignee: Project Inbox <egit.ui-inbox>
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: P3 CC: alex.blewitt, kolb, matthias.sohn, thomas.bieser
Version: 0.11   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Jens Baumgart CLA 2011-02-14 12:21:31 EST
Copy a corrupted URI to the clipboard e.g. //git.wdf.sap.corp/egit.git

Start clone wizard from Repositories View. Now the system hangs >10s

Problem: RepositorySelectionPage calls Transport.canHandleProtocol(u, FS.DETECTED) with the given URI from the clipboard.



Thread [main] (Suspended)	
	java.io.WinNTFileSystem.getBooleanAttributes(java.io.File) line: not available [native method]	
	java.io.File.isFile() line: not available	
	org.eclipse.jgit.transport.TransportBundleFile.canHandle(org.eclipse.jgit.transport.URIish, org.eclipse.jgit.util.FS) line: 68	
	org.eclipse.jgit.transport.Transport.canHandleProtocol(org.eclipse.jgit.transport.URIish, org.eclipse.jgit.util.FS) line: 347	
	org.eclipse.egit.ui.internal.components.RepositorySelectionPage.<init>(boolean, java.util.List<org.eclipse.jgit.transport.RemoteConfig>, java.lang.String) line: 332	
	org.eclipse.egit.ui.internal.components.RepositorySelectionPage.<init>(boolean, java.lang.String) line: 372	
	org.eclipse.egit.ui.internal.clone.GitCloneWizard.<init>() line: 77	
	org.eclipse.egit.ui.internal.repository.tree.command.CloneCommand.execute(org.eclipse.core.commands.ExecutionEvent) line: 26
Comment 1 Jens Baumgart CLA 2011-02-14 12:28:20 EST
Perhaps the URI could be checked before talking to Transport.
Comment 2 Jens Baumgart CLA 2011-02-15 11:35:16 EST
Problems: 

- check takes long time
- wizard is not up
- user gets no feedback
- not working URI is thrown away without feedback to the user
Comment 3 Matthias Sohn CLA 2013-05-11 18:41:58 EDT
this works for me with current nightly build without hanging