src/jdk/nashorn/internal/runtime/regexp/joni/Compiler.java

changeset 1082
e1e27c4262be
parent 962
ac62e33a99b0
child 1205
4112748288bb
     1.1 --- a/src/jdk/nashorn/internal/runtime/regexp/joni/Compiler.java	Mon Nov 03 07:29:46 2014 +0100
     1.2 +++ b/src/jdk/nashorn/internal/runtime/regexp/joni/Compiler.java	Mon Nov 03 11:47:41 2014 +0100
     1.3 @@ -53,13 +53,17 @@
     1.4      protected abstract void compileAltNode(ConsAltNode node);
     1.5  
     1.6      private void compileStringRawNode(final StringNode sn) {
     1.7 -        if (sn.length() <= 0) return;
     1.8 +        if (sn.length() <= 0) {
     1.9 +            return;
    1.10 +        }
    1.11          addCompileString(sn.chars, sn.p, sn.length(), false);
    1.12      }
    1.13  
    1.14      private void compileStringNode(final StringNode node) {
    1.15          final StringNode sn = node;
    1.16 -        if (sn.length() <= 0) return;
    1.17 +        if (sn.length() <= 0) {
    1.18 +            return;
    1.19 +        }
    1.20  
    1.21          final boolean ambig = sn.isAmbig();
    1.22  
    1.23 @@ -145,7 +149,9 @@
    1.24      }
    1.25  
    1.26      protected final void compileTreeNTimes(final Node node, final int n) {
    1.27 -        for (int i=0; i<n; i++) compileTree(node);
    1.28 +        for (int i=0; i<n; i++) {
    1.29 +            compileTree(node);
    1.30 +        }
    1.31      }
    1.32  
    1.33      protected void newSyntaxException(final String message) {

mercurial