package com.ibm.icu.impl;
import java.nio.ByteBuffer;
-import java.util.Arrays;
import java.util.HashMap;
import java.util.Set;
import java.util.TreeSet;
index[0] = i;
}
if (i < 0) {
- throw new UResourceTypeMismatchException("Could not get the correct value for index: "+ Arrays.toString(index));
+ throw new UResourceTypeMismatchException("Could not get the correct value for index: "+ indexStr);
}
return createBundleObject(i, indexStr, table, requested, isAlias);
}
return(arrayEquals((Object[]) source,target));
if (source instanceof int[])
return(arrayEquals((int[]) source,target));
- if (source instanceof double[]) {
- double[] oldSource = (double[]) source;
- int[] newSource = new int[oldSource.length];
- for (int i = 0; i < oldSource.length; i++)
- newSource[i] = (int)oldSource[i];
- return arrayEquals(newSource, target);
- }
+ if (source instanceof double[])
+ return(arrayEquals((double[]) source, target));
if (source instanceof byte[])
return(arrayEquals((byte[]) source,target));
return source.equals(target);
if (srb != null) {
ICUResourceBundle brb = srb.findWithFallback("beforeCurrency");
ICUResourceBundle arb = srb.findWithFallback("afterCurrency");
- if (brb != null) {
+ if (arb != null && brb != null) {
String beforeCurrencyMatch = brb.findWithFallback("currencyMatch").getString();
String beforeContextMatch = brb.findWithFallback("surroundingMatch").getString();
String beforeInsert = brb.findWithFallback("insertBetween").getString();
if (rule.equals("")) {
errln("UCA rule string should not be empty");
}
+ coll = new RuleBasedCollator(rule);
} catch (Exception e) {
warnln(e.getMessage());
}
UCharacter.codePointAt(reg_text, 100, limitCases[i]);
errln("UCharacter.codePointAt was suppose to return an exception " +
"but got " + UCharacter.codePointAt(reg_text, 100, limitCases[i]) +
- ". The following passed parameters were Text: " + Arrays.toString(reg_text) + ", Start: " +
+ ". The following passed parameters were Text: " + String.valueOf(reg_text) + ", Start: " +
100 + ", Limit: " + limitCases[i] + ".");
} catch(Exception e){
}
UCharacter.codePointAt(empty_text, 0, limitCases[i]);
errln("UCharacter.codePointAt was suppose to return an exception " +
"but got " + UCharacter.codePointAt(empty_text, 0, limitCases[i]) +
- ". The following passed parameters were Text: " + Arrays.toString(empty_text) + ", Start: " +
+ ". The following passed parameters were Text: " + String.valueOf(empty_text) + ", Start: " +
0 + ", Limit: " + limitCases[i] + ".");
} catch(Exception e){
}
UCharacter.codePointCount(one_char_text, 0, limitCases[i]);
errln("UCharacter.codePointCount was suppose to return an exception " +
"but got " + UCharacter.codePointCount(one_char_text, 0, limitCases[i]) +
- ". The following passed parameters were Text: " + Arrays.toString(one_char_text) + ", Start: " +
+ ". The following passed parameters were Text: " + String.valueOf(one_char_text) + ", Start: " +
0 + ", Limit: " + limitCases[i] + ".");
} catch(Exception e){
}
UCharacter.codePointCount(reg_text, 100, limitCases[i]);
errln("UCharacter.codePointCount was suppose to return an exception " +
"but got " + UCharacter.codePointCount(reg_text, 100, limitCases[i]) +
- ". The following passed parameters were Text: " + Arrays.toString(reg_text) + ", Start: " +
+ ". The following passed parameters were Text: " + String.valueOf(reg_text) + ", Start: " +
100 + ", Limit: " + limitCases[i] + ".");
} catch(Exception e){
}
UCharacter.codePointCount(empty_text, 0, limitCases[i]);
errln("UCharacter.codePointCount was suppose to return an exception " +
"but got " + UCharacter.codePointCount(empty_text, 0, limitCases[i]) +
- ". The following passed parameters were Text: " + Arrays.toString(empty_text) + ", Start: " +
+ ". The following passed parameters were Text: " + String.valueOf(empty_text) + ", Start: " +
0 + ", Limit: " + limitCases[i] + ".");
} catch(Exception e){
}
UCharacter.codePointCount(one_char_text, 0, limitCases[i]);
errln("UCharacter.codePointCount was suppose to return an exception " +
"but got " + UCharacter.codePointCount(one_char_text, 0, limitCases[i]) +
- ". The following passed parameters were Text: " + Arrays.toString(one_char_text) + ", Start: " +
+ ". The following passed parameters were Text: " + String.valueOf(one_char_text) + ", Start: " +
0 + ", Limit: " + limitCases[i] + ".");
} catch(Exception e){
}
input="a\u2260b\u226Ec\u226Fd";
not3.nameToUnicode(input, result, info);
if(!UTF16Plus.equal(result, input) || info.hasErrors()) {
- errln(String.format("notSTD3.nameToUnicode(equiv to non-LDH ASCII) unexpected errors %04x string %s",
- info.getErrors(), prettify(result.toString())));
+ errln(String.format("notSTD3.nameToUnicode(equiv to non-LDH ASCII) unexpected errors %s string %s",
+ info.getErrors().toString(), prettify(result.toString())));
}
}
if(aN.indexOf(".")<0) {
if(!UTF16Plus.equal(aN, aNL) || !sameErrors(aNInfo, aNLInfo)) {
errln(String.format("N.nameToASCII([%d] %s)!=N.labelToASCII() "+
- "(errors %s vs %04x) %s vs. %s",
- i, testCase.s, aNInfo.getErrors(), aNLInfo.getErrors(),
+ "(errors %s vs %s) %s vs. %s",
+ i, testCase.s, aNInfo.getErrors().toString(), aNLInfo.getErrors().toString(),
prettify(aN.toString()), prettify(aNL.toString())));
continue;
}
if(aT.indexOf(".")<0) {
if(!UTF16Plus.equal(aT, aTL) || !sameErrors(aTInfo, aTLInfo)) {
errln(String.format("T.nameToASCII([%d] %s)!=T.labelToASCII() "+
- "(errors %s vs %04x) %s vs. %s",
- i, testCase.s, aTInfo.getErrors(), aTLInfo.getErrors(),
+ "(errors %s vs %s) %s vs. %s",
+ i, testCase.s, aTInfo.getErrors().toString(), aTLInfo.getErrors().toString(),
prettify(aT.toString()), prettify(aTL.toString())));
continue;
}
if(uN.indexOf(".")<0) {
if(!UTF16Plus.equal(uN, uNL) || !sameErrors(uNInfo, uNLInfo)) {
errln(String.format("N.nameToUnicode([%d] %s)!=N.labelToUnicode() "+
- "(errors %s vs %04x) %s vs. %s",
- i, testCase.s, uNInfo.getErrors(), uNLInfo.getErrors(),
+ "(errors %s vs %s) %s vs. %s",
+ i, testCase.s, uNInfo.getErrors().toString(), uNLInfo.getErrors().toString(),
prettify(uN.toString()), prettify(uNL.toString())));
continue;
}
if(uT.indexOf(".")<0) {
if(!UTF16Plus.equal(uT, uTL) || !sameErrors(uTInfo, uTLInfo)) {
errln(String.format("T.nameToUnicode([%d] %s)!=T.labelToUnicode() "+
- "(errors %s vs %04x) %s vs. %s",
- i, testCase.s, uTInfo.getErrors(), uTLInfo.getErrors(),
+ "(errors %s vs %s) %s vs. %s",
+ i, testCase.s, uTInfo.getErrors().toString(), uTLInfo.getErrors().toString(),
prettify(uT.toString()), prettify(uTL.toString())));
continue;
}
}
public boolean equals(Object obj1) {
- return false;
+ return obj1 instanceof LabelComparator;
}
}