mirror of
https://github.com/konsoletyper/teavm.git
synced 2025-01-24 10:44:13 +08:00
Fix errors that cause several regex tests to fail
This commit is contained in:
parent
8926306f17
commit
48d2732acc
@ -256,7 +256,7 @@ public class TCharacter extends TObject implements TComparable<TCharacter> {
|
||||
return -1;
|
||||
}
|
||||
int d = getNumericValue(codePoint);
|
||||
return d <= radix ? d : -1;
|
||||
return d < radix ? d : -1;
|
||||
}
|
||||
|
||||
public static int getNumericValue(char ch) {
|
||||
@ -293,7 +293,7 @@ public class TCharacter extends TObject implements TComparable<TCharacter> {
|
||||
}
|
||||
|
||||
public static boolean isDigit(int codePoint) {
|
||||
return getNumericValue(codePoint) >= 0;
|
||||
return getType(codePoint) == DECIMAL_DIGIT_NUMBER;
|
||||
}
|
||||
|
||||
private static int[] getDigitMapping() {
|
||||
|
@ -36,6 +36,7 @@
|
||||
package org.teavm.classlib.java.util.regex;
|
||||
|
||||
import java.util.BitSet;
|
||||
import java.util.MissingResourceException;
|
||||
|
||||
/**
|
||||
* This class represents character classes, i.e. sets of character either
|
||||
@ -871,7 +872,7 @@ abstract class TAbstractCharClass extends TSpecialToken {
|
||||
return row[1];
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new MissingResourceException("", "", name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user