Skip to content

Commit 920c12e

Browse files
committed
graceful error handling of read separator when no tokens remain
1 parent fdbfaae commit 920c12e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/main/java/mil/nga/crs/wkt/CRSReader.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1188,7 +1188,7 @@ public boolean peekRightDelimiter() throws IOException {
11881188
*/
11891189
public void readSeparator() throws IOException {
11901190
String token = reader.peekToken();
1191-
if (token.equals(WKTConstants.SEPARATOR)) {
1191+
if (token != null && token.equals(WKTConstants.SEPARATOR)) {
11921192
reader.readExpectedToken();
11931193
} else if (strict) {
11941194
throw new CRSException(

0 commit comments

Comments
 (0)