if (productName == null)
throw new IllegalArgumentException(
"productName : " + JaiI18N.getString("Generic0"));
CaselessStringKey fileName =
(CaselessStringKey)instancesByName.get(factoryInstance);
if (fileName != null) {
Vector v = (Vector)instances.get(fileName);
String pn = (String)v.get(1);
String dn = (String)v.get(2);
if ((dn != null) && dn.equalsIgnoreCase(descriptorName) &&
(pn != null) && pn.equalsIgnoreCase(productName)) {
return;
}
}
throw new IllegalArgumentException(
JaiI18N.formatMsg("FactoryCache3",
new Object[] { factoryInstance.getClass().getName(),
descriptorName, productName}));
} else {
CaselessStringKey key = new CaselessStringKey(descriptorName);
if (factoryInstance != instances.get(key)) {
throw new IllegalArgumentException(
JaiI18N.formatMsg("FactoryCache4",
new Object[] { factoryInstance.getClass().getName(),