Bug 685 - Analyze all core sources for FindBug hits as mentioned below (ongoing bug entry)
Summary: Analyze all core sources for FindBug hits as mentioned below (ongoing bug entry)
Status: UNCONFIRMED
Alias: None
Product: General
Classification: JogAmp
Component: source_code (show other bugs)
Version: unspecified
Hardware: All all
: P5 enhancement
Assignee: Sven Gothel
URL:
Depends on:
Blocks:
 
Reported: 2013-02-07 00:10 CET by Sven Gothel
Modified: 2013-03-27 14:08 CET (History)
3 users (show)

See Also:
Type: ---
SCM Refs:
Workaround: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sven Gothel 2013-02-07 00:10:34 CET
http://findbugs.sourceforge.net/bugDescriptions.html#DMI_BLOCKING_METHODS_ON_URL

See bug 683.

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. 

+++

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

.. we should not have this one :)

+++

http://findbugs.sourceforge.net/bugDescriptions.html#DMI_INVOKING_TOSTRING_ON_ARRAY
USELESS_STRING: Invocation of toString on an array (DMI_INVOKING_TOSTRING_ON_ARRAY)

The code invokes toString on an array, which will generate a fairly useless result such as [C@16f0472. Consider using Arrays.toString to convert the array into a readable String that gives the contents of the array. See Programming Puzzlers, chapter 3, puzzle 12.
Comment 1 Harvey Harrison 2013-02-07 20:37:33 CET
I need to find a good way to process the findbugs output so I can put a
todo list here.

In the meantime, I've pushed out a patch to github changing all the occurences
where toString was being called on an array (all 6 of them).

I haven't given this a whole lot of thought, so feel free to ignore until I
look more closely, the are all in other toString() methods.

git://github.com/hharrison/jogl.git master

Harvey
Comment 2 Julien Gouesse 2013-03-27 14:08:25 CET
Harvey, do you plan to make a pull request with your findings?