while (freeXML11DTDLoaderIndex >= 0) {
// return first available DTD loader
SoftReference ref = xml11DTDLoaders[freeXML11DTDLoaderIndex];
XMLDTDLoaderHolder holder = (XMLDTDLoaderHolder) ref.get();
if (holder != null && holder.loader != null) {
XMLDTDLoader val = holder.loader;
holder.loader = null;
--freeXML11DTDLoaderIndex;
return val;
}
xml11DTDLoaders[freeXML11DTDLoaderIndex--] = null;
}
//MF
return (XMLDTDLoader) (ObjectFactory
.newInstance(
"mf.org.apache.xerces.impl.dtd.XML11DTDProcessor",
ObjectFactory.findClassLoader(),
true));
}
// return an instance of XMLDTDLoader
else {
while (freeXML10DTDLoaderIndex >= 0) {
// return first available DTD loader
SoftReference ref = xml10DTDLoaders[freeXML10DTDLoaderIndex];
XMLDTDLoaderHolder holder = (XMLDTDLoaderHolder) ref.get();
if (holder != null && holder.loader != null) {
XMLDTDLoader val = holder.loader;
holder.loader = null;
--freeXML10DTDLoaderIndex;
return val;
}
xml10DTDLoaders[freeXML10DTDLoaderIndex--] = null;
}
return new XMLDTDLoader();
}
}