if (fieldValue != null) {
Class attributeClass = (Class)((AbstractSession)session).getDatasourcePlatform().convertObject(fieldValue, ClassConstants.CLASS);
try {
if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()){
try {
attributeValue = AccessController.doPrivileged(new PrivilegedNewInstanceFromClass(attributeClass));
} catch (PrivilegedActionException exception) {
throw ConversionException.couldNotBeConverted(fieldValue, attributeClass, exception.getException());
}
} else {
attributeValue = PrivilegedAccessHelper.newInstanceFromClass(attributeClass);