Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 335705 - [server] Utils.isValidRemote(GitFileStore) seems to be redundant
Summary: [server] Utils.isValidRemote(GitFileStore) seems to be redundant
Status: RESOLVED FIXED
Alias: None
Product: Orion
Classification: ECD
Component: Client (show other bugs)
Version: 0.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 0.2   Edit
Assignee: Tomasz Zarna CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 334094
  Show dependency tree
 
Reported: 2011-01-28 12:00 EST by Tomasz Zarna CLA
Modified: 2011-09-01 11:41 EDT (History)
0 users

See Also:


Attachments
Fix v01 (32.14 KB, patch)
2011-02-01 09:17 EST, Tomasz Zarna CLA
no flags Details | Diff
mylyn/context/zip (36.29 KB, application/octet-stream)
2011-02-01 09:17 EST, Tomasz Zarna CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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.