snaju / artemis-framework

Automatically exported from code.google.com/p/artemis-framework
0 stars 0 forks source link

String comparison in GroupManager #3

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
In GroupManager the following is used for String comparison:

                if(group == g || group.equals(g)) {
                    return true;
                }

This kind of micro-optimization isn't necessary, the jvm developers are 
perfectly aware of String interning and the implementation of String.equals 
includes:

        if (this == anObject) {
            return true;
        }

Original issue reported on code.google.com by seraphim...@gmail.com on 14 Oct 2012 at 3:05