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

Bug 335705

Summary: [server] Utils.isValidRemote(GitFileStore) seems to be redundant
Product: [ECD] Orion Reporter: Tomasz Zarna <tomasz.zarna>
Component: ClientAssignee: Tomasz Zarna <tomasz.zarna>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 0.2   
Target Milestone: 0.2   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on:    
Bug Blocks: 334094    
Attachments:
Description Flags
Fix v01
none
mylyn/context/zip none

Description Tomasz Zarna CLA 2011-01-28 12:00:25 EST
org.eclipse.orion.internal.server.filesystem.git.Utils.isValidRemote(GitFileStore), which called before listing children names and fetching info, seems to be redundant. Since we make a remote connection anyway there is no need do to it twice (check and then do the call). Instead, we could gracefully handle an eventual exception thrown when doing the remote call. Other actions like push or pull are doing fine without checking first if the remote is valid.
Comment 1 Tomasz Zarna CLA 2011-02-01 04:25:24 EST
Once removed the access modifier for org.eclipse.orion.server.filesystem.git.GitFileStore.getCredentialsProvider() should be set back to private.
Comment 2 Tomasz Zarna CLA 2011-02-01 09:17:16 EST
Created attachment 188042 [details]
Fix v01

The fix doesn't help much when working with local repositories.
Comment 3 Tomasz Zarna CLA 2011-02-01 09:17:19 EST
Created attachment 188043 [details]
mylyn/context/zip
Comment 4 Tomasz Zarna CLA 2011-02-03 11:16:53 EST
Fixed with  793b6106b616027c8c8896dcfef09567c1d7385a.