News for hackers. Stuff that matters.
Re:The problem with new URL(), and how URL.parse() fixes that by mkleczek on Monday May 20, 2024 @06:17AM (#40413961)
Ahh... MalformedURLException is checked in Java and is a source of constant backlash from developers - for over 20 years :)
Re:The problem with new URL(), and how URL.parse() fixes that by chopin on Monday May 20, 2024 @06:27AM (#40414011)
I prefer the Optional.of and Optional.ofNullable approach. Analogous there should be URL.of and URL.ofChecked, the latter for potentially unkown input. Same for Charset.
Re:The problem with new URL(), and how URL.parse() fixes that by _ZeD_ on Monday May 20, 2024 @12:00PM (#40416927)
malformed urls have always been the issue, not the exception