If there's an ampersand that doesn't actually have a closing semi-colon, the process eventually runs out of characters and then fails doing a charAt(0). Catch this issue and throw a useful exception.
This commit is contained in:
parent
d17a8da923
commit
5d9b7f4d62
|
@ -885,6 +885,8 @@ private boolean elementIsOk(String name) throws FHIRFormatError {
|
|||
// UInt16 w;
|
||||
readChar();
|
||||
String c = readUntil(";&'\"><");
|
||||
if (c.isEmpty())
|
||||
throw new FHIRFormatError("Invalid literal declaration following text: " + s);
|
||||
if (c.equals("apos"))
|
||||
s.append('\'');
|
||||
else if (c.equals("quot"))
|
||||
|
|
Loading…
Reference in New Issue