mbien edited a comment on pull request #3414:
URL: https://github.com/apache/netbeans/pull/3414#issuecomment-1008922917


   > > avoiding using URLs whenever possible
   > 
   > Great idea when you write new code or refactor internals of existing one. 
However here we are dealing with 20 years old already existing API. Just 
replacing `java.net.URL` with `java.net.URI` would cause uncountable 
disruptions in NetBeans own source code as well as applications using the 
NetBeans Platform.
   
   @JaroslavTulach I was not proposing to change any existing API. (although 
JDK 8 would have all tools it needs for a migration, default methods and the 
fact that there are easy ways to convert between URL and URI - its basically a 
best case scenario).
   
   But this should be considered for new APIs and impls which use the actual 
classes - since its easy to overlook. I also use the word "avoiding" in the 
"try not to use if possible" sense, not in the "its forbidden" sense.
   
   > @mbien this is another philosophical one ;) if interested, let's take it 
on the mailing list.
   
   @sdedic the philosophical discussion probably happened when URL was 
implemented, now we can only try to find technical solutions to deal with the 
non-obvious side effects of the URL class (e.g. 
[inspections](https://github.com/mbien/jackpot-inspections/blob/master/CollectionPerformance.hint#L233-L264)).
 [JEP 418](https://openjdk.java.net/jeps/418) might help mitigating some side 
effects, but thats JDK 18 and would be only a mitigation.


-- 
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