if (defaultPRB == null){
throw new IOException("Could not find required file: "+res);
}
} else if (checkUnexpected) {
// Check all the keys are in the default props file
PropertyResourceBundle prb = getRAS(res);
if (prb == null){
return;
}
final ArrayList<String> list = Collections.list(prb.getKeys());
Collections.sort(list);
final boolean mainResourceFile = resname.startsWith("messages");
for (String key : list) {
try {
String val = defaultPRB.getString(key); // Also Check key is in default
if (mainResourceFile && val.equals(prb.getString(key))){
System.out.println("Duplicate value? "+key+"="+val+" in "+res);
subTestFailures++;
}
} catch (MissingResourceException e) {
subTestFailures++;