Skip to content

Commit fb5f6d6

Browse files
author
lucaijun
committed
AJ-546: fix duration unit not upper letter without error
1 parent 951a625 commit fb5f6d6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/com/xxdb/data/BasicDuration.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,8 @@ private int getCodeNumber(String unit) {
190190
} else if (unit.length() == 4) {
191191
int[] codes = new int[4];
192192
for (int i = 0; i < 4; i++) {
193-
if (Character.isLowerCase(unit.charAt(i)))
194-
throw new RuntimeException("the exchange unit except all upper, got " + unit);
193+
if (!Character.isUpperCase(unit.charAt(i)))
194+
throw new RuntimeException("except upper letter, got " + unit);
195195
codes[i] = unit.charAt(i);
196196
}
197197
return (codes[0] << 24) + (codes[1] << 16) + (codes[2] << 8) + codes[3];

0 commit comments

Comments
 (0)