Skip to content

Commit aa54f8c

Browse files
committed
Use output from matcher group 3 instead of indexOf
1 parent fb86efb commit aa54f8c

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/main/java/org/scijava/parsington/Literals.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -407,9 +407,8 @@ public static Number parseDecimal(final CharSequence s, final Position pos) {
407407
final boolean forceLong = "l".equalsIgnoreCase(force);
408408
final boolean forceFloat = "f".equalsIgnoreCase(force);
409409
final boolean forceDouble = "d".equalsIgnoreCase(force);
410-
final int dot = number.indexOf(".");
411410
Number result = null;
412-
if ((dot == -1) && !forceFloat && !forceDouble) {
411+
if ((m.start(3) == -1) && !forceFloat && !forceDouble) {
413412
result = parseInteger(number, forceLong, 10);
414413
}
415414
if (result == null && !forceLong) {

0 commit comments

Comments
 (0)