src/java.base/share/classes/java/util/regex/Pattern.java
changeset 53018 8bf9268df0e2
parent 52902 e3398b2e1ab0
child 54206 003cc64366da
equal deleted inserted replaced
53017:e10a1f7aaa13 53018:8bf9268df0e2
  1388         capturingGroupCount = 1;
  1388         capturingGroupCount = 1;
  1389         localCount = 0;
  1389         localCount = 0;
  1390         localTCNCount = 0;
  1390         localTCNCount = 0;
  1391 
  1391 
  1392         // if length > 0, the Pattern is lazily compiled
  1392         // if length > 0, the Pattern is lazily compiled
  1393         if (pattern.length() == 0) {
  1393         if (pattern.isEmpty()) {
  1394             root = new Start(lastAccept);
  1394             root = new Start(lastAccept);
  1395             matchRoot = lastAccept;
  1395             matchRoot = lastAccept;
  1396             compiled = true;
  1396             compiled = true;
  1397         }
  1397         }
  1398     }
  1398     }
  1421         // Reset group index count
  1421         // Reset group index count
  1422         capturingGroupCount = 1;
  1422         capturingGroupCount = 1;
  1423         localCount = 0;
  1423         localCount = 0;
  1424         localTCNCount = 0;
  1424         localTCNCount = 0;
  1425 
  1425 
  1426         if (pattern.length() > 0) {
  1426         if (!pattern.isEmpty()) {
  1427             compile();
  1427             compile();
  1428         } else {
  1428         } else {
  1429             root = new Start(lastAccept);
  1429             root = new Start(lastAccept);
  1430             matchRoot = lastAccept;
  1430             matchRoot = lastAccept;
  1431         }
  1431         }