Permalink
Browse files

small cleanup

  • Loading branch information...
1 parent dca57ce commit b69656fb3226688142393f8727e6ab68e2aa003b @laforge49 committed Dec 15, 2012
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/main/java/org/agilewiki/jactor/factory/JAFactory.java
@@ -195,8 +195,9 @@ public void registerActorFactory(ActorFactory actorFactory)
throws Exception {
String actorType = actorFactory.actorType;
ActorFactory old = types.get(actorType);
- if (old != null && !old.equals(actorFactory))
+ if (old == null)
+ types.put(actorType, actorFactory);
+ else if (!old.equals(actorFactory))
throw new IllegalArgumentException("Actor type is already defined: " + actorType);
- types.put(actorType, actorFactory);
}
}

0 comments on commit b69656f

Please sign in to comment.