summaryrefslogtreecommitdiff
path: root/libjava/classpath/gnu/regexp/RETokenChar.java
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/classpath/gnu/regexp/RETokenChar.java')
-rw-r--r--libjava/classpath/gnu/regexp/RETokenChar.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/libjava/classpath/gnu/regexp/RETokenChar.java b/libjava/classpath/gnu/regexp/RETokenChar.java
index a15449b2d96..5c087c68778 100644
--- a/libjava/classpath/gnu/regexp/RETokenChar.java
+++ b/libjava/classpath/gnu/regexp/RETokenChar.java
@@ -52,6 +52,10 @@ final class RETokenChar extends REToken {
return ch.length;
}
+ int getMaximumLength() {
+ return ch.length;
+ }
+
boolean match(CharIndexed input, REMatch mymatch) {
int z = ch.length;
char c;
@@ -68,7 +72,7 @@ final class RETokenChar extends REToken {
// Overrides REToken.chain() to optimize for strings
boolean chain(REToken next) {
- if (next instanceof RETokenChar) {
+ if (next instanceof RETokenChar && ((RETokenChar)next).insens == insens) {
RETokenChar cnext = (RETokenChar) next;
// assume for now that next can only be one character
int newsize = ch.length + cnext.ch.length;