Re:Java's URL.equals() Performs DNS Resolution
by jillesvangurp on Thursday December 12, 2019 @06:09AM
(#21770912)
You should also use a gradle or maven plugin called forbidden-apis to prevent people using deprecated stuff like this. I've been adding this to pretty much any Java/Kotlin project for years with some custom patterns to also prevent people using shadowed packages that some libraries expose. In this case, for forbidding java.net.URL.equals is probably a good idea. Might already be in the default patterns.
Also sounds like something a good static code analyzer should be able to detect.
Also sounds like something a good static code analyzer should be able to detect.