Look ma, it's the last word in a small Ray-Charlie quibble. :)
I just feel like: imagine if there were no Map.containsKey(). You would instead have to get() the value and see if it's not null. If you did that, you certainly wouldn't throw away the value if you were going to get it again right below, would you? So why would you do it simply because of the addition of a convenient method called containsKey()? git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5067 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -362,10 +362,13 @@ public class PlaceManager
|
||||
|
||||
// Lazily create our dispatcher now that it's actually getting a message
|
||||
if (_dispatcher == null) {
|
||||
if (!_dispatcherFinders.containsKey(getClass())) {
|
||||
_dispatcherFinders.put(getClass(), new MethodFinder(getClass()));
|
||||
Class clazz = getClass();
|
||||
MethodFinder finder = _dispatcherFinders.get(clazz);
|
||||
if (finder == null) {
|
||||
finder = new MethodFinder(clazz);
|
||||
_dispatcherFinders.put(clazz, finder);
|
||||
}
|
||||
_dispatcher = new DynamicListener(this, _dispatcherFinders.get(getClass()));
|
||||
_dispatcher = new DynamicListener(this, finder);
|
||||
}
|
||||
_dispatcher.dispatchMethod(event.getName(), nargs);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user