src/jdk/nashorn/internal/runtime/regexp/DefaultRegExp.java

changeset 139
390d44ba90cf
parent 114
508da3c7fc3a
child 247
5a3f7867e19c
     1.1 --- a/src/jdk/nashorn/internal/runtime/regexp/DefaultRegExp.java	Tue Mar 12 21:17:47 2013 +0530
     1.2 +++ b/src/jdk/nashorn/internal/runtime/regexp/DefaultRegExp.java	Thu Mar 14 14:49:55 2013 +0100
     1.3 @@ -95,14 +95,14 @@
     1.4              return null; // never matches or similar, e.g. a[]
     1.5          }
     1.6  
     1.7 -        RegExpMatcher matcher = this.matcher;
     1.8 +        RegExpMatcher currentMatcher = this.matcher;
     1.9  
    1.10 -        if (matcher == null || matcher.getInput() != str) {
    1.11 -            matcher = new DefaultMatcher(str);
    1.12 -            this.matcher = matcher;
    1.13 +        if (currentMatcher == null || matcher.getInput() != str) {
    1.14 +            currentMatcher = new DefaultMatcher(str);
    1.15 +            this.matcher  = currentMatcher;
    1.16          }
    1.17  
    1.18 -        return matcher;
    1.19 +        return currentMatcher;
    1.20      }
    1.21  
    1.22      class DefaultMatcher implements RegExpMatcher {

mercurial