diff options
Diffstat (limited to 'src/jdk/nashorn/internal/runtime/regexp/joni/NodeOptInfo.java')
-rw-r--r-- | src/jdk/nashorn/internal/runtime/regexp/joni/NodeOptInfo.java | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/src/jdk/nashorn/internal/runtime/regexp/joni/NodeOptInfo.java b/src/jdk/nashorn/internal/runtime/regexp/joni/NodeOptInfo.java index 76b1d5f6..a5e569dc 100644 --- a/src/jdk/nashorn/internal/runtime/regexp/joni/NodeOptInfo.java +++ b/src/jdk/nashorn/internal/runtime/regexp/joni/NodeOptInfo.java @@ -19,6 +19,7 @@ */ package jdk.nashorn.internal.runtime.regexp.joni; +@SuppressWarnings("javadoc") public final class NodeOptInfo { final MinMaxLen length = new MinMaxLen(); final OptAnchorInfo anchor = new OptAnchorInfo(); @@ -27,7 +28,7 @@ public final class NodeOptInfo { final OptExactInfo expr = new OptExactInfo(); /* prec read (?=...) */ final OptMapInfo map = new OptMapInfo(); /* boundary */ - public void setBoundNode(MinMaxLen mmd) { + public void setBoundNode(final MinMaxLen mmd) { exb.mmd.copy(mmd); expr.mmd.copy(mmd); map.mmd.copy(mmd); @@ -42,7 +43,7 @@ public final class NodeOptInfo { map.clear(); } - public void copy(NodeOptInfo other) { + public void copy(final NodeOptInfo other) { length.copy(other.length); anchor.copy(other.anchor); exb.copy(other.exb); @@ -51,8 +52,8 @@ public final class NodeOptInfo { map.copy(other.map); } - public void concatLeftNode(NodeOptInfo other) { - OptAnchorInfo tanchor = new OptAnchorInfo(); // remove it somehow ? + public void concatLeftNode(final NodeOptInfo other) { + final OptAnchorInfo tanchor = new OptAnchorInfo(); // remove it somehow ? tanchor.concat(anchor, other.anchor, length.max, other.length.max); anchor.copy(tanchor); @@ -67,8 +68,8 @@ public final class NodeOptInfo { } } - boolean exbReach = exb.reachEnd; - boolean exmReach = exm.reachEnd; + final boolean exbReach = exb.reachEnd; + final boolean exmReach = exm.reachEnd; if (other.length.max != 0) { exb.reachEnd = exm.reachEnd = false; @@ -91,8 +92,12 @@ public final class NodeOptInfo { if (other.length.max > 0) { // TODO: make sure it is not an Oniguruma bug (casting unsigned int to int for arithmetic comparison) int otherLengthMax = other.length.max; - if (otherLengthMax == MinMaxLen.INFINITE_DISTANCE) otherLengthMax = -1; - if (expr.length > otherLengthMax) expr.length = otherLengthMax; + if (otherLengthMax == MinMaxLen.INFINITE_DISTANCE) { + otherLengthMax = -1; + } + if (expr.length > otherLengthMax) { + expr.length = otherLengthMax; + } if (expr.mmd.max == 0) { exb.select(expr); } else { @@ -107,7 +112,7 @@ public final class NodeOptInfo { length.add(other.length); } - public void altMerge(NodeOptInfo other, OptEnvironment env) { + public void altMerge(final NodeOptInfo other, final OptEnvironment env) { anchor.altMerge(other.anchor); exb.altMerge(other.exb, env); exm.altMerge(other.exm, env); @@ -116,7 +121,7 @@ public final class NodeOptInfo { length.altMerge(other.length); } - public void setBound(MinMaxLen mmd) { + public void setBound(final MinMaxLen mmd) { exb.mmd.copy(mmd); expr.mmd.copy(mmd); map.mmd.copy(mmd); |