sdedic commented on pull request #3414:
URL: https://github.com/apache/netbeans/pull/3414#issuecomment-1007203521


   > First of all I'd like to point out I have already approved your PR. The 
changes are sane and acceptable from some architecture 
   
   I know. This discussion is about coming to an agreement, or a practical 
compromise. Maybe 3rd view would help.
   
   > I am more scared of duplicating the _existing_ API by a (95% similar) 
concept, just to be _pure_ and absolutely correct.
   
   Well, not exactly. When `pseudoURL.open*()` throw an exception, you can't 
really know (if there's a mix of real+ephemeral URLs), if something broke or 
you just hit the ephemeral one, for example. If ever someone prints 
fakeURL.toString() and will try to convert it back, an exception is likely 
(handler not registered). fakeURL.toURI() will work, but 
fakeURL.toURI().toURL() will fail. We break the java.net.UR(I|L) behaviour at 
runtime ... but yes, the API would be simpler.
   
   > However there was no `java.net.URI` when NetBeans started. The [java.net 
package](https://www.cs.princeton.edu/courses/archive/fall97/cs461/jdkdocs/api/Package-java.net.html)
 contained just `java.net.URL` and other APIs like 
[Class.getResource](https://www.cs.princeton.edu/courses/archive/fall97/cs461/jdkdocs/api/java.lang.Class.html#getResource(java.lang.String))
 used it to refer to other objects than just those on _World Wide Web_.
   > 
   The Locator was not required to point to WWW. It is required to _locate_ the 
resource so its _content_ can be _accessed_ (other ops possible). The 
ClassLoader methods were right to use URLs, as the purpose was to access 
content (to a lesser degree identify the resource, but as each well-formed URL 
is URI, it's satisfied by the contract).
   I believe we have a different situation here.
   
   > Yes, your position is acceptable. It just leads to more complicated 
system. If we pretended **URI** could be represented by `java.net.URL` (as in 
the early days of Java), we'd get simpler result.
   
   Hm, let's let some other party to weigh in :) there are yet some other 
reviewers available. Functionally, I am mostly afraid of weird bugs from 
circulating URLs, that are not URLs and break the usual URL conversion/usage 
patterns, through the system at runtime.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to