diff --git a/merlin-driver/src/main/java/gov/nasa/jpl/aerie/merlin/driver/MissionModelBuilder.java b/merlin-driver/src/main/java/gov/nasa/jpl/aerie/merlin/driver/MissionModelBuilder.java index 4818d5cf0e..240a31dd7b 100644 --- a/merlin-driver/src/main/java/gov/nasa/jpl/aerie/merlin/driver/MissionModelBuilder.java +++ b/merlin-driver/src/main/java/gov/nasa/jpl/aerie/merlin/driver/MissionModelBuilder.java @@ -118,6 +118,7 @@ CellId allocate( @Override public void resource(final String name, final Resource resource) { + if (this.resources.containsKey(name)) throw new IllegalArgumentException("A resource with that name has already been declared: \"" + name + "\""); this.resources.put(name, resource); }