no error if an element is added to the library twice

This commit is contained in:
hneemann 2016-06-01 20:55:13 +02:00
parent ff80a4da28
commit 67bb079bbb

View File

@ -98,13 +98,10 @@ public class ElementLibrary implements Iterable<ElementLibrary.ElementContainer>
/**
* Adds a description to the library
*
* @param description the descritpion
* @param description the description
*/
public void addDescription(ElementTypeDescription description) {
String name = description.getName();
if (map.containsKey(name))
throw new RuntimeException(Lang.get("err_duplicateElement_N", name));
map.put(name, description);
}