mirror of https://github.com/apache/maven.git
[MNG-7965] Fix duplicate tags not rejected (#1344)
This commit is contained in:
parent
a1fe9fc387
commit
d9a49e6ff7
|
@ -761,6 +761,10 @@ public class ${className} {
|
|||
throw new XMLStreamException("Duplicated tag: '" + tagName + "'", parser.getLocation(), null);
|
||||
}
|
||||
}
|
||||
#else
|
||||
if (!parsed.add(tagName)) {
|
||||
throw new XMLStreamException("Duplicated tag: '" + tagName + "'", parser.getLocation(), null);
|
||||
}
|
||||
#end
|
||||
return tagName;
|
||||
}
|
||||
|
|
|
@ -613,6 +613,7 @@ public class ${className} {
|
|||
#foreach( $entry in $aliases.entrySet() )
|
||||
case "${entry.key}":
|
||||
tagName = "${entry.value}";
|
||||
break;
|
||||
#end
|
||||
}
|
||||
#end
|
||||
|
@ -627,6 +628,10 @@ public class ${className} {
|
|||
throw new XMLStreamException("Duplicated tag: '" + tagName + "'", parser.getLocation(), null);
|
||||
}
|
||||
}
|
||||
#else
|
||||
if (!parsed.add(tagName)) {
|
||||
throw new XMLStreamException("Duplicated tag: '" + tagName + "'", parser.getLocation(), null);
|
||||
}
|
||||
#end
|
||||
return tagName;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue