Skip to content
This repository has been archived by the owner on Aug 23, 2023. It is now read-only.

Commit

Permalink
Correcting bug in default space creation with Hazelcast
Browse files Browse the repository at this point in the history
Close #101
  • Loading branch information
ngaud committed Feb 13, 2015
1 parent 9b20214 commit 0035ee1
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,13 @@ public String toString() {
EventSpace postConstruction() {
this.spaceRepository.postConstruction();
this.defaultSpace = createSpace(OpenEventSpaceSpecification.class, this.defaultSpaceID);
return this.defaultSpace;
if (this.defaultSpace != null) {
return this.defaultSpace;
}
//Could have been created before thanks to Hazelcast, thus createSpace returns null because the space already exist,
//in this case we return the already existing version stored in the repository
return (EventSpace) this.spaceRepository.getSpace(new SpaceID(this.id, this.defaultSpaceID,
OpenEventSpaceSpecification.class));
}

/** Destroy any associated resources.
Expand Down

0 comments on commit 0035ee1

Please sign in to comment.