Bug 683

Summary: Fix URL Usage due to DNS Lookups on equals(..) and hashCode()
Product: [JogAmp] Gluegen Reporter: Sven Gothel <sgothel>
Component: coreAssignee: Sven Gothel <sgothel>
Status: RESOLVED FIXED    
Severity: major CC: gouessej, harvey.harrison, xerxes
Priority: P3    
Version: 2   
Hardware: All   
OS: all   
Type: --- SCM Refs:
gluegen b98825eb7cfb61aead4a7dff57471cd2d2c26823 gluegen 377d9de1ff1e2fabcd9bb7f65c0318f3c890392c
Workaround: ---
Bug Depends on: 757, 820, 857    
Bug Blocks:    

Description Sven Gothel 2013-02-06 23:21:35 CET
(Thx to Harvey Harrison who pointed this out.)

http://findbugs.sourceforge.net/bugDescriptions.html#DMI_BLOCKING_METHODS_ON_URL

Dm: The equals and hashCode methods of URL are blocking (DMI_BLOCKING_METHODS_ON_URL)

The equals and hashCode method of URL perform domain name resolution, this can result in a big performance hit. See http://michaelscharf.blogspot.com/2006/11/javaneturlequals-and-hashcode-make.html for more information. Consider using java.net.URI instead.
Comment 1 Julien Gouesse 2013-04-16 10:30:20 CEST
In which classes do we use URLs except TextureIO & AWTTextureIO?
Comment 2 Sven Gothel 2013-06-09 08:57:15 CEST
GlueGen: IOUtil, JarUtil, TempJarCache, .. uses URI instead of URL to remove DNS Lookups etc .

I have not seen further URL usage w/ equals/hash, 
which could trigger a DNS lookup.

If anybody finds those .. pls reopen and report.