diff --git a/src/org/joni/Regex.java b/src/org/joni/Regex.java index f573773..e7e6b69 100644 --- a/src/org/joni/Regex.java +++ b/src/org/joni/Regex.java @@ -370,7 +370,9 @@ void setOptimizeExactInfo(OptExactInfo e) { if (e.length >= 3 || (e.length >= 2 && allowReverse)) { forward = enc.toLowerCaseTable() != null ? Search.SLOW_IC_SB_FORWARD : Search.SLOW_IC_FORWARD; if (!setupBMSkipMap(true)) { - forward = allowReverse ? Search.BM_IC_FORWARD : Search.BM_NOT_REV_IC_FORWARD; + forward = allowReverse ? (enc.toLowerCaseTable() != null ? Search.SLOW_IC_SB_FORWARD : Search.SLOW_IC_FORWARD) : Search.BM_NOT_REV_IC_FORWARD; + // FIXME: put above line in place to work around some failures. Either BM_IC_FORWARD is broken here or we are choosing it when we shouldn't. + //forward = allowReverse ? Search.BM_IC_FORWARD : Search.BM_NOT_REV_IC_FORWARD; } else { forward = enc.toLowerCaseTable() != null ? Search.SLOW_IC_SB_FORWARD : Search.SLOW_IC_FORWARD; } diff --git a/src/org/joni/SingleRegion.java b/src/org/joni/SingleRegion.java index 612dcc0..a99bf3b 100644 --- a/src/org/joni/SingleRegion.java +++ b/src/org/joni/SingleRegion.java @@ -24,7 +24,7 @@ public class SingleRegion extends Region { int end; public SingleRegion(int num) { - if (num != 1) throw new IndexOutOfBoundsException(num); + if (num != 1) throw new IndexOutOfBoundsException(""+num); } public SingleRegion(int begin, int end) { @@ -43,22 +43,22 @@ public SingleRegion clone() { } public int getBeg(int index) { - if (index != 0) throw new IndexOutOfBoundsException(index); + if (index != 0) throw new IndexOutOfBoundsException(""+index); return beg; } public int setBeg(int index, int value) { - if (index != 0) throw new IndexOutOfBoundsException(index); + if (index != 0) throw new IndexOutOfBoundsException(""+index); return beg = value; } public int getEnd(int index) { - if (index != 0) throw new IndexOutOfBoundsException(index); + if (index != 0) throw new IndexOutOfBoundsException(""+index); return end; } public int setEnd(int index, int value) { - if (index != 0) throw new IndexOutOfBoundsException(index); + if (index != 0) throw new IndexOutOfBoundsException(""+index); return end = value; }