try {
Class[] parameters = new Class[]{ClassConstants.PINT, ClassDescriptor.class, AbstractSession.class, boolean.class};
Object[] values = new Object[]{Integer.valueOf(size), descriptor, this.session, isIsolated};
if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()) {
Constructor constructor = (Constructor)AccessController.doPrivileged(new PrivilegedGetConstructorFor(identityMapClass, parameters, false));
IdentityMap map = (IdentityMap)AccessController.doPrivileged(new PrivilegedInvokeConstructor(constructor, values));
if ((descriptor != null) && (descriptor.getCachePolicy().getCacheInterceptorClass() != null)) {
constructor = (Constructor)AccessController.doPrivileged(new PrivilegedGetConstructorFor(descriptor.getCacheInterceptorClass(), new Class[] { IdentityMap.class, AbstractSession.class }, false));
Object params[] = new Object[]{map, this.session};
map = (IdentityMap)AccessController.doPrivileged(new PrivilegedInvokeConstructor(constructor, params));
}
return map;
} else {
Constructor constructor = PrivilegedAccessHelper.getConstructorFor(identityMapClass, parameters, false);
IdentityMap map = (IdentityMap)PrivilegedAccessHelper.invokeConstructor(constructor, values);