Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

small cleanup

  • Loading branch information...
commit b69656fb3226688142393f8727e6ab68e2aa003b 1 parent dca57ce
Bill La Forge authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/main/java/org/agilewiki/jactor/factory/JAFactory.java
5 src/main/java/org/agilewiki/jactor/factory/JAFactory.java
View
@@ -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);
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.