Fixing bug in below/above implementations found while implementing NumericEntityEscaper

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@788257 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Henri Yandell 2009-06-25 04:57:19 +00:00
parent b4bdbdfe9c
commit bda5d16000
1 changed files with 2 additions and 2 deletions

View File

@ -30,11 +30,11 @@ public class UnicodeEscaper extends CodePointTranslator {
private boolean between = true; private boolean between = true;
public static UnicodeEscaper below(int codepoint) { public static UnicodeEscaper below(int codepoint) {
return between(0, codepoint); return outsideOf(codepoint, Integer.MAX_VALUE);
} }
public static UnicodeEscaper above(int codepoint) { public static UnicodeEscaper above(int codepoint) {
return between(codepoint, Integer.MAX_VALUE); return outsideOf(0, codepoint);
} }
public static UnicodeEscaper outsideOf(int codepointLow, int codepointHigh) { public static UnicodeEscaper outsideOf(int codepointLow, int codepointHigh) {