Skip to content

Commit

Permalink
Fail on duplicate simple types
Browse files Browse the repository at this point in the history
  • Loading branch information
IotaBread committed Jan 11, 2024
1 parent 61b414a commit 6b7a495
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ public void read() {
while (reader.hasNext()) {
String type = reader.nextName();

if (this.entries.containsKey(type)) {
throw new IllegalArgumentException("Duplicate type " + type);
}

switch (reader.peek()) {
case STRING -> {
String localName = reader.nextString();
Expand Down

0 comments on commit 6b7a495

Please sign in to comment.