Bug 376939 - provide default impl for isValidUrl in settings page
Summary: provide default impl for isValidUrl in settings page
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 enhancement (vote)
Target Milestone: 3.8   Edit
Assignee: Benjamin Muskalla CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2012-04-17 03:35 EDT by Benjamin Muskalla CLA
Modified: 2012-05-08 11:30 EDT (History)
0 users

See Also:


Attachments
NEW--bug-376939-provide-default-impl-for-isValidUrl-.patch (8.36 KB, patch)
2012-05-07 07:40 EDT, Benjamin Muskalla CLA
no flags Details | Diff
mylyn/context/zip (18.98 KB, application/octet-stream)
2012-05-07 07:40 EDT, Benjamin Muskalla CLA
no flags Details
mylyn/context/zip (1.46 KB, application/octet-stream)
2012-05-08 10:31 EDT, Steffen Pingel CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Muskalla CLA 2012-04-17 03:35:54 EDT
CUrrenlty, most clients implement @AbstractRepositorySettingsPage#isValidUrl@ in very similar ways (eg. check for http and see if it parses as url). Given many repositories can't do much more about checking the url, we should provide a default implementation for it and make it non-abstract. This would ease implementation and is a binary compatible change. API consumers are still able to override/enhance the check if the repository has identifiable parts in the url (eg. http://..../myRepo/)
Comment 1 Steffen Pingel CLA 2012-04-17 13:42:35 EDT
Sounds reasonable. Do you want to provide a patch?
Comment 2 Benjamin Muskalla CLA 2012-04-29 05:37:39 EDT
Pushed change as http://review.mylyn.org/#change,508

Steffen, can you have a look if the special handling in Trac is really needed?
Comment 3 Steffen Pingel CLA 2012-05-03 14:19:37 EDT
I believe the client implementation in the Trac connector makes the assumption that the URL has a trailing slash. I'd have to look into this in more detail to be sure though.
Comment 4 Benjamin Muskalla CLA 2012-05-07 07:40:01 EDT
Created attachment 215173 [details]
NEW--bug-376939-provide-default-impl-for-isValidUrl-.patch

1. authored 100% the content they are contributing
Yes

2. have the rights to donate the content to EPL
Yes

3. contribute the content under the EPL
Yes
Comment 5 Benjamin Muskalla CLA 2012-05-07 07:40:03 EDT
Created attachment 215174 [details]
mylyn/context/zip
Comment 6 Steffen Pingel CLA 2012-05-08 10:31:37 EDT
Thanks! I have applied the change to master.
Comment 7 Steffen Pingel CLA 2012-05-08 10:31:40 EDT
Created attachment 215262 [details]
mylyn/context/zip
Comment 8 Benjamin Muskalla CLA 2012-05-08 11:30:58 EDT
Thanks Steffen.