3 ms·
What's frustrating in hindsight is they knew the URL class was obviously terrible, but never made a serious effort to stop people using it. I'm fine with not b
by ben509 7y ago
What's frustrating in hindsight is they knew the URL class was obviously terrible, but never made a serious effort to stop people using it.
I'm fine with not breaking old jars, but they could have made newer javac's by default die with a notice "use -legacy to build this". Same thing with Date, Vector, all the broken thread semantics, you name it.
These classes should have been relegated to a handful of ancient jars, they shouldn't keep popping up in modern Java because newbies have to learn a whole host of classes they aren't supposed to use.
- kjeetgill 7y agoI sorta agree when in comes to Vector and some of the Thread stuff, but URL is only broken in gethashcode() and equals(). The rest of the class is perfectly fine. It's a great simple curl that takes you pretty far before you reach for a real http client lib.