Community
Participate
Working Groups
When stared on p2, we wanted to use URIs instead of URLs but we drifted and ended up using URLs only. In 3.5, we need to revisit this and avoid using URLs because: 1) they force a corresponding protocol to be registered 2) comparing URL can be extremely slow in some environments A few additional issues to think about when doing this replacement: - URI/URL encoding and decoding - Eclipse in UNC paths environments - Dealing with path math
One interesting aspect of using URI's would be if the URI scheme was used when finding repository factories. Will that be covered within the scope of this bug?
This is possible, but it can't be the only way to distinguish repository types. For example we already have several repository factories that use the "http" scheme. See also bug 177231.
This is released. Some random notes: - Tagged p2.* with tag "v20081008_pre_uri_switch" before releasing. - Changed code using URL.toExternalForm() for equals/hashCode to use URI.equals/hashCode directly, since these methods are not expensive - Added class URIUtil with various convenience methods to help construct and manipulate URIs - Have not touched fwAdmin or simpleconfigurator which also do URL manipulation - Fields, methods, and variables containing "url" were renamed to use "location" or "repoLocation" instead. I'm sure I've missed some of these. - repository locations are now stored in the preference store in encoded URI form. There is backwards compatibility code for reading unencoded URLs from preferences if there is no URI available - Entered bug 250219 with patch to fix references in PDE. - Various tests added for different flavours of problematic URIs. Tests involving metadata repos, artifact repos, and update sites with spaces in their paths were added. a URIUtilTest class was added for testing corner cases of the convenience methods. I'm going to close this bug, and we can open new bugs for the inevitable issues that come up.