Program: 67765
Project: 67765
Buggy source:
/** 
 * INTERNAL: Convert all the class-name-based settings in this Descriptor to actual class-based settings. This method is used when converting a project that has been built with class names to a project with classes.
 * @param classLoader 
 */
public void convertClassNamesToClasses(ClassLoader classLoader){
  Class descriptorClass=null;
  Class amendmentClass=null;
  Class redirectorClass=null;
  CopyPolicy newCopyPolicy=null;
  try {
    if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()) {
      try {
        descriptorClass=(Class)AccessController.doPrivileged(new PrivilegedClassForName(getJavaClassName(),true,classLoader));
      }
 catch (      PrivilegedActionException exception) {
        throw ValidationException.classNotFoundWhileConvertingClassNames(getJavaClassName(),exception.getException());
      }
    }
 else {
      descriptorClass=org.eclipse.persistence.internal.security.PrivilegedAccessHelper.getClassForName(getJavaClassName(),true,classLoader);
    }
  }
 catch (  ClassNotFoundException exc) {
    throw ValidationException.classNotFoundWhileConvertingClassNames(getJavaClassName(),exc);
  }
  try {
    if (getAmendmentClassName() != null) {
      if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()) {
        try {
          amendmentClass=(Class)AccessController.doPrivileged(new PrivilegedClassForName(getAmendmentClassName(),true,classLoader));
        }
 catch (        PrivilegedActionException exception) {
          throw ValidationException.classNotFoundWhileConvertingClassNames(getAmendmentClassName(),exception.getException());
        }
      }
 else {
        amendmentClass=org.eclipse.persistence.internal.security.PrivilegedAccessHelper.getClassForName(getAmendmentClassName(),true,classLoader);
      }
    }
  }
 catch (  ClassNotFoundException exc) {
    throw ValidationException.classNotFoundWhileConvertingClassNames(getAmendmentClassName(),exc);
  }
  try {
    Class copyPolicyClass=null;
    if (copyPolicy == null && getCopyPolicyClassName() != null) {
      if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()) {
        try {
          copyPolicyClass=(Class)AccessController.doPrivileged(new PrivilegedClassForName(getCopyPolicyClassName(),true,classLoader));
        }
 catch (        PrivilegedActionException exception) {
          throw ValidationException.classNotFoundWhileConvertingClassNames(getCopyPolicyClassName(),exception.getException());
        }
      }
 else {
        copyPolicyClass=org.eclipse.persistence.internal.security.PrivilegedAccessHelper.getClassForName(getCopyPolicyClassName(),true,classLoader);
      }
      if (copyPolicyClass != null) {
        if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()) {
          try {
            newCopyPolicy=(CopyPolicy)AccessController.doPrivileged(new PrivilegedNewInstanceFromClass(copyPolicyClass));
          }
 catch (          PrivilegedActionException exception) {
            throw ValidationException.classNotFoundWhileConvertingClassNames(getCopyPolicyClassName(),exception.getException());
          }
        }
 else {
          newCopyPolicy=(CopyPolicy)org.eclipse.persistence.internal.security.PrivilegedAccessHelper.newInstanceFromClass(copyPolicyClass);
        }
      }
    }
  }
 catch (  ClassNotFoundException exc) {
    throw ValidationException.classNotFoundWhileConvertingClassNames(getCopyPolicyClassName(),exc);
  }
catch (  IllegalAccessException ex) {
    throw ValidationException.reflectiveExceptionWhileCreatingClassInstance(getCopyPolicyClassName(),ex);
  }
catch (  InstantiationException e) {
    throw ValidationException.reflectiveExceptionWhileCreatingClassInstance(getCopyPolicyClassName(),e);
  }
  setJavaClass(descriptorClass);
  if (amendmentClass != null) {
    setAmendmentClass(amendmentClass);
  }
  if (newCopyPolicy != null) {
    setCopyPolicy(newCopyPolicy);
  }
  try {
    if (cacheInterceptorClass == null && cacheInterceptorClassName != null) {
      if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()) {
        try {
          cacheInterceptorClass=(Class)AccessController.doPrivileged(new PrivilegedClassForName(cacheInterceptorClassName,true,classLoader));
        }
 catch (        PrivilegedActionException exception) {
          throw ValidationException.classNotFoundWhileConvertingClassNames(cacheInterceptorClassName,exception.getException());
        }
      }
 else {
        cacheInterceptorClass=org.eclipse.persistence.internal.security.PrivilegedAccessHelper.getClassForName(cacheInterceptorClassName,true,classLoader);
      }
    }
  }
 catch (  ClassNotFoundException exc) {
    throw ValidationException.classNotFoundWhileConvertingClassNames(cacheInterceptorClassName,exc);
  }
  if (this.defaultQueryRedirectorClassName != null) {
    try {
      if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()) {
        try {
          redirectorClass=(Class)AccessController.doPrivileged(new PrivilegedClassForName(defaultQueryRedirectorClassName,true,classLoader));
        }
 catch (        PrivilegedActionException exception) {
          throw ValidationException.classNotFoundWhileConvertingClassNames(defaultQueryRedirectorClassName,exception.getException());
        }
        try {
          setDefaultQueryRedirector((QueryRedirector)AccessController.doPrivileged(new PrivilegedNewInstanceFromClass(redirectorClass)));
        }
 catch (        PrivilegedActionException exception) {
          throw ValidationException.classNotFoundWhileConvertingClassNames(defaultQueryRedirectorClassName,exception.getException());
        }
      }
 else {
        redirectorClass=org.eclipse.persistence.internal.security.PrivilegedAccessHelper.getClassForName(defaultQueryRedirectorClassName,true,classLoader);
        setDefaultQueryRedirector((QueryRedirector)org.eclipse.persistence.internal.security.PrivilegedAccessHelper.newInstanceFromClass(redirectorClass));
      }
    }
 catch (    ClassNotFoundException exc) {
      throw ValidationException.classNotFoundWhileConvertingClassNames(defaultQueryRedirectorClassName,exc);
    }
catch (    Exception e) {
      throw ValidationException.classNotFoundWhileConvertingClassNames(defaultQueryRedirectorClassName,e);
    }
  }
  if (this.defaultReadObjectQueryRedirectorClassName != null) {
    try {
      if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()) {
        try {
          redirectorClass=(Class)AccessController.doPrivileged(new PrivilegedClassForName(defaultReadObjectQueryRedirectorClassName,true,classLoader));
        }
 catch (        PrivilegedActionException exception) {
          throw ValidationException.classNotFoundWhileConvertingClassNames(defaultReadObjectQueryRedirectorClassName,exception.getException());
        }
        try {
          setDefaultReadObjectQueryRedirector((QueryRedirector)AccessController.doPrivileged(new PrivilegedNewInstanceFromClass(redirectorClass)));
        }
 catch (        PrivilegedActionException exception) {
          throw ValidationException.classNotFoundWhileConvertingClassNames(defaultReadObjectQueryRedirectorClassName,exception.getException());
        }
      }
 else {
        redirectorClass=org.eclipse.persistence.internal.security.PrivilegedAccessHelper.getClassForName(defaultReadObjectQueryRedirectorClassName,true,classLoader);
        setDefaultReadObjectQueryRedirector((QueryRedirector)org.eclipse.persistence.internal.security.PrivilegedAccessHelper.newInstanceFromClass(redirectorClass));
      }
    }
 catch (    ClassNotFoundException exc) {
      throw ValidationException.classNotFoundWhileConvertingClassNames(defaultReadObjectQueryRedirectorClassName,exc);
    }
catch (    Exception e) {
      throw ValidationException.classNotFoundWhileConvertingClassNames(defaultReadObjectQueryRedirectorClassName,e);
    }
  }
  if (this.defaultReadAllQueryRedirectorClassName != null) {
    try {
      if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()) {
        try {
          redirectorClass=(Class)AccessController.doPrivileged(new PrivilegedClassForName(defaultReadAllQueryRedirectorClassName,true,classLoader));
        }
 catch (        PrivilegedActionException exception) {
          throw ValidationException.classNotFoundWhileConvertingClassNames(defaultReadAllQueryRedirectorClassName,exception.getException());
        }
        try {
          setDefaultReadAllQueryRedirector((QueryRedirector)AccessController.doPrivileged(new PrivilegedNewInstanceFromClass(redirectorClass)));
        }
 catch (        PrivilegedActionException exception) {
          throw ValidationException.classNotFoundWhileConvertingClassNames(defaultReadAllQueryRedirectorClassName,exception.getException());
        }
      }
 else {
        redirectorClass=org.eclipse.persistence.internal.security.PrivilegedAccessHelper.getClassForName(defaultReadAllQueryRedirectorClassName,true,classLoader);
        setDefaultReadAllQueryRedirector((QueryRedirector)org.eclipse.persistence.internal.security.PrivilegedAccessHelper.newInstanceFromClass(redirectorClass));
      }
    }
 catch (    ClassNotFoundException exc) {
      throw ValidationException.classNotFoundWhileConvertingClassNames(defaultReadAllQueryRedirectorClassName,exc);
    }
catch (    Exception e) {
      throw ValidationException.classNotFoundWhileConvertingClassNames(defaultReadAllQueryRedirectorClassName,e);
    }
  }
  if (this.defaultReportQueryRedirectorClassName != null) {
    try {
      if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()) {
        try {
          redirectorClass=(Class)AccessController.doPrivileged(new PrivilegedClassForName(defaultReportQueryRedirectorClassName,true,classLoader));
        }
 catch (        PrivilegedActionException exception) {
          throw ValidationException.classNotFoundWhileConvertingClassNames(defaultReportQueryRedirectorClassName,exception.getException());
        }
        try {
          setDefaultReportQueryRedirector((QueryRedirector)AccessController.doPrivileged(new PrivilegedNewInstanceFromClass(redirectorClass)));
        }
 catch (        PrivilegedActionException exception) {
          throw ValidationException.classNotFoundWhileConvertingClassNames(defaultReportQueryRedirectorClassName,exception.getException());
        }
      }
 else {
        redirectorClass=org.eclipse.persistence.internal.security.PrivilegedAccessHelper.getClassForName(defaultReportQueryRedirectorClassName,true,classLoader);
        setDefaultReportQueryRedirector((QueryRedirector)org.eclipse.persistence.internal.security.PrivilegedAccessHelper.newInstanceFromClass(redirectorClass));
      }
    }
 catch (    ClassNotFoundException exc) {
      throw ValidationException.classNotFoundWhileConvertingClassNames(defaultReportQueryRedirectorClassName,exc);
    }
catch (    Exception e) {
      throw ValidationException.classNotFoundWhileConvertingClassNames(defaultReportQueryRedirectorClassName,e);
    }
  }
  if (this.defaultInsertObjectQueryRedirectorClassName != null) {
    try {
      if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()) {
        try {
          redirectorClass=(Class)AccessController.doPrivileged(new PrivilegedClassForName(defaultInsertObjectQueryRedirectorClassName,true,classLoader));
        }
 catch (        PrivilegedActionException exception) {
          throw ValidationException.classNotFoundWhileConvertingClassNames(defaultInsertObjectQueryRedirectorClassName,exception.getException());
        }
        try {
          setDefaultInsertObjectQueryRedirector((QueryRedirector)AccessController.doPrivileged(new PrivilegedNewInstanceFromClass(redirectorClass)));
        }
 catch (        PrivilegedActionException exception) {
          throw ValidationException.classNotFoundWhileConvertingClassNames(defaultInsertObjectQueryRedirectorClassName,exception.getException());
        }
      }
 else {
        redirectorClass=org.eclipse.persistence.internal.security.PrivilegedAccessHelper.getClassForName(defaultInsertObjectQueryRedirectorClassName,true,classLoader);
        setDefaultInsertObjectQueryRedirector((QueryRedirector)org.eclipse.persistence.internal.security.PrivilegedAccessHelper.newInstanceFromClass(redirectorClass));
      }
    }
 catch (    ClassNotFoundException exc) {
      throw ValidationException.classNotFoundWhileConvertingClassNames(defaultInsertObjectQueryRedirectorClassName,exc);
    }
catch (    Exception e) {
      throw ValidationException.classNotFoundWhileConvertingClassNames(defaultInsertObjectQueryRedirectorClassName,e);
    }
  }
  if (this.defaultUpdateObjectQueryRedirectorClassName != null) {
    try {
      if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()) {
        try {
          redirectorClass=(Class)AccessController.doPrivileged(new PrivilegedClassForName(defaultUpdateObjectQueryRedirectorClassName,true,classLoader));
        }
 catch (        PrivilegedActionException exception) {
          throw ValidationException.classNotFoundWhileConvertingClassNames(defaultUpdateObjectQueryRedirectorClassName,exception.getException());
        }
        try {
          setDefaultUpdateObjectQueryRedirector((QueryRedirector)AccessController.doPrivileged(new PrivilegedNewInstanceFromClass(redirectorClass)));
        }
 catch (        PrivilegedActionException exception) {
          throw ValidationException.classNotFoundWhileConvertingClassNames(defaultUpdateObjectQueryRedirectorClassName,exception.getException());
        }
      }
 else {
        redirectorClass=org.eclipse.persistence.internal.security.PrivilegedAccessHelper.getClassForName(defaultUpdateObjectQueryRedirectorClassName,true,classLoader);
        setDefaultUpdateObjectQueryRedirector((QueryRedirector)org.eclipse.persistence.internal.security.PrivilegedAccessHelper.newInstanceFromClass(redirectorClass));
      }
    }
 catch (    ClassNotFoundException exc) {
      throw ValidationException.classNotFoundWhileConvertingClassNames(defaultUpdateObjectQueryRedirectorClassName,exc);
    }
catch (    Exception e) {
      throw ValidationException.classNotFoundWhileConvertingClassNames(defaultUpdateObjectQueryRedirectorClassName,e);
    }
  }
  if (this.defaultDeleteObjectQueryRedirectorClassName != null) {
    try {
      if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()) {
        try {
          redirectorClass=(Class)AccessController.doPrivileged(new PrivilegedClassForName(defaultDeleteObjectQueryRedirectorClassName,true,classLoader));
        }
 catch (        PrivilegedActionException exception) {
          throw ValidationException.classNotFoundWhileConvertingClassNames(defaultDeleteObjectQueryRedirectorClassName,exception.getException());
        }
        try {
          setDefaultDeleteObjectQueryRedirector((QueryRedirector)AccessController.doPrivileged(new PrivilegedNewInstanceFromClass(redirectorClass)));
        }
 catch (        PrivilegedActionException exception) {
          throw ValidationException.classNotFoundWhileConvertingClassNames(defaultDeleteObjectQueryRedirectorClassName,exception.getException());
        }
      }
 else {
        redirectorClass=org.eclipse.persistence.internal.security.PrivilegedAccessHelper.getClassForName(defaultDeleteObjectQueryRedirectorClassName,true,classLoader);
        setDefaultDeleteObjectQueryRedirector((QueryRedirector)org.eclipse.persistence.internal.security.PrivilegedAccessHelper.newInstanceFromClass(redirectorClass));
      }
    }
 catch (    ClassNotFoundException exc) {
      throw ValidationException.classNotFoundWhileConvertingClassNames(defaultDeleteObjectQueryRedirectorClassName,exc);
    }
catch (    Exception e) {
      throw ValidationException.classNotFoundWhileConvertingClassNames(defaultDeleteObjectQueryRedirectorClassName,e);
    }
  }
  Iterator mappings=getMappings().iterator();
  while (mappings.hasNext()) {
    ((DatabaseMapping)mappings.next()).convertClassNamesToClasses(classLoader);
  }
  if (this.inheritancePolicy != null) {
    this.inheritancePolicy.convertClassNamesToClasses(classLoader);
  }
  if (this.interfacePolicy != null) {
    this.interfacePolicy.convertClassNamesToClasses(classLoader);
  }
  if (this.instantiationPolicy != null) {
    this.instantiationPolicy.convertClassNamesToClasses(classLoader);
  }
  if (hasCMPPolicy()) {
    getCMPPolicy().convertClassNamesToClasses(classLoader);
  }
  this.queryManager.convertClassNamesToClasses(classLoader);
}

Fixed version (ground truth):
/** 
 * INTERNAL: Convert all the class-name-based settings in this Descriptor to actual class-based settings. This method is used when converting a project that has been built with class names to a project with classes.
 * @param classLoader 
 */
public void convertClassNamesToClasses(ClassLoader classLoader){
  Class descriptorClass=null;
  Class amendmentClass=null;
  Class redirectorClass=null;
  CopyPolicy newCopyPolicy=null;
  try {
    if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()) {
      try {
        descriptorClass=(Class)AccessController.doPrivileged(new PrivilegedClassForName(getJavaClassName(),true,classLoader));
      }
 catch (      PrivilegedActionException exception) {
        throw ValidationException.classNotFoundWhileConvertingClassNames(getJavaClassName(),exception.getException());
      }
    }
 else {
      descriptorClass=org.eclipse.persistence.internal.security.PrivilegedAccessHelper.getClassForName(getJavaClassName(),true,classLoader);
    }
  }
 catch (  ClassNotFoundException exc) {
    throw ValidationException.classNotFoundWhileConvertingClassNames(getJavaClassName(),exc);
  }
  try {
    if (getAmendmentClassName() != null) {
      if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()) {
        try {
          amendmentClass=(Class)AccessController.doPrivileged(new PrivilegedClassForName(getAmendmentClassName(),true,classLoader));
        }
 catch (        PrivilegedActionException exception) {
          throw ValidationException.classNotFoundWhileConvertingClassNames(getAmendmentClassName(),exception.getException());
        }
      }
 else {
        amendmentClass=org.eclipse.persistence.internal.security.PrivilegedAccessHelper.getClassForName(getAmendmentClassName(),true,classLoader);
      }
    }
  }
 catch (  ClassNotFoundException exc) {
    throw ValidationException.classNotFoundWhileConvertingClassNames(getAmendmentClassName(),exc);
  }
  try {
    Class copyPolicyClass=null;
    if (copyPolicy == null && getCopyPolicyClassName() != null) {
      if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()) {
        try {
          copyPolicyClass=(Class)AccessController.doPrivileged(new PrivilegedClassForName(getCopyPolicyClassName(),true,classLoader));
        }
 catch (        PrivilegedActionException exception) {
          throw ValidationException.classNotFoundWhileConvertingClassNames(getCopyPolicyClassName(),exception.getException());
        }
      }
 else {
        copyPolicyClass=org.eclipse.persistence.internal.security.PrivilegedAccessHelper.getClassForName(getCopyPolicyClassName(),true,classLoader);
      }
      if (copyPolicyClass != null) {
        if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()) {
          try {
            newCopyPolicy=(CopyPolicy)AccessController.doPrivileged(new PrivilegedNewInstanceFromClass(copyPolicyClass));
          }
 catch (          PrivilegedActionException exception) {
            throw ValidationException.classNotFoundWhileConvertingClassNames(getCopyPolicyClassName(),exception.getException());
          }
        }
 else {
          newCopyPolicy=(CopyPolicy)org.eclipse.persistence.internal.security.PrivilegedAccessHelper.newInstanceFromClass(copyPolicyClass);
        }
      }
    }
  }
 catch (  ClassNotFoundException exc) {
    throw ValidationException.classNotFoundWhileConvertingClassNames(getCopyPolicyClassName(),exc);
  }
catch (  IllegalAccessException ex) {
    throw ValidationException.reflectiveExceptionWhileCreatingClassInstance(getCopyPolicyClassName(),ex);
  }
catch (  InstantiationException e) {
    throw ValidationException.reflectiveExceptionWhileCreatingClassInstance(getCopyPolicyClassName(),e);
  }
  setJavaClass(descriptorClass);
  if (amendmentClass != null) {
    setAmendmentClass(amendmentClass);
  }
  if (newCopyPolicy != null) {
    setCopyPolicy(newCopyPolicy);
  }
  try {
    if (cacheInterceptorClass == null && cacheInterceptorClassName != null) {
      if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()) {
        try {
          cacheInterceptorClass=(Class)AccessController.doPrivileged(new PrivilegedClassForName(cacheInterceptorClassName,true,classLoader));
        }
 catch (        PrivilegedActionException exception) {
          throw ValidationException.classNotFoundWhileConvertingClassNames(cacheInterceptorClassName,exception.getException());
        }
      }
 else {
        cacheInterceptorClass=org.eclipse.persistence.internal.security.PrivilegedAccessHelper.getClassForName(cacheInterceptorClassName,true,classLoader);
      }
    }
  }
 catch (  ClassNotFoundException exc) {
    throw ValidationException.classNotFoundWhileConvertingClassNames(cacheInterceptorClassName,exc);
  }
  if (this.defaultQueryRedirectorClassName != null) {
    try {
      if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()) {
        try {
          redirectorClass=(Class)AccessController.doPrivileged(new PrivilegedClassForName(defaultQueryRedirectorClassName,true,classLoader));
        }
 catch (        PrivilegedActionException exception) {
          throw ValidationException.classNotFoundWhileConvertingClassNames(defaultQueryRedirectorClassName,exception.getException());
        }
        try {
          setDefaultQueryRedirector((QueryRedirector)AccessController.doPrivileged(new PrivilegedNewInstanceFromClass(redirectorClass)));
        }
 catch (        PrivilegedActionException exception) {
          throw ValidationException.classNotFoundWhileConvertingClassNames(defaultQueryRedirectorClassName,exception.getException());
        }
      }
 else {
        redirectorClass=org.eclipse.persistence.internal.security.PrivilegedAccessHelper.getClassForName(defaultQueryRedirectorClassName,true,classLoader);
        setDefaultQueryRedirector((QueryRedirector)org.eclipse.persistence.internal.security.PrivilegedAccessHelper.newInstanceFromClass(redirectorClass));
      }
    }
 catch (    ClassNotFoundException exc) {
      throw ValidationException.classNotFoundWhileConvertingClassNames(defaultQueryRedirectorClassName,exc);
    }
catch (    Exception e) {
      throw ValidationException.classNotFoundWhileConvertingClassNames(defaultQueryRedirectorClassName,e);
    }
  }
  if (this.defaultReadObjectQueryRedirectorClassName != null) {
    try {
      if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()) {
        try {
          redirectorClass=(Class)AccessController.doPrivileged(new PrivilegedClassForName(defaultReadObjectQueryRedirectorClassName,true,classLoader));
        }
 catch (        PrivilegedActionException exception) {
          throw ValidationException.classNotFoundWhileConvertingClassNames(defaultReadObjectQueryRedirectorClassName,exception.getException());
        }
        try {
          setDefaultReadObjectQueryRedirector((QueryRedirector)AccessController.doPrivileged(new PrivilegedNewInstanceFromClass(redirectorClass)));
        }
 catch (        PrivilegedActionException exception) {
          throw ValidationException.classNotFoundWhileConvertingClassNames(defaultReadObjectQueryRedirectorClassName,exception.getException());
        }
      }
 else {
        redirectorClass=org.eclipse.persistence.internal.security.PrivilegedAccessHelper.getClassForName(defaultReadObjectQueryRedirectorClassName,true,classLoader);
        setDefaultReadObjectQueryRedirector((QueryRedirector)org.eclipse.persistence.internal.security.PrivilegedAccessHelper.newInstanceFromClass(redirectorClass));
      }
    }
 catch (    ClassNotFoundException exc) {
      throw ValidationException.classNotFoundWhileConvertingClassNames(defaultReadObjectQueryRedirectorClassName,exc);
    }
catch (    Exception e) {
      throw ValidationException.classNotFoundWhileConvertingClassNames(defaultReadObjectQueryRedirectorClassName,e);
    }
  }
  if (this.defaultReadAllQueryRedirectorClassName != null) {
    try {
      if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()) {
        try {
          redirectorClass=(Class)AccessController.doPrivileged(new PrivilegedClassForName(defaultReadAllQueryRedirectorClassName,true,classLoader));
        }
 catch (        PrivilegedActionException exception) {
          throw ValidationException.classNotFoundWhileConvertingClassNames(defaultReadAllQueryRedirectorClassName,exception.getException());
        }
        try {
          setDefaultReadAllQueryRedirector((QueryRedirector)AccessController.doPrivileged(new PrivilegedNewInstanceFromClass(redirectorClass)));
        }
 catch (        PrivilegedActionException exception) {
          throw ValidationException.classNotFoundWhileConvertingClassNames(defaultReadAllQueryRedirectorClassName,exception.getException());
        }
      }
 else {
        redirectorClass=org.eclipse.persistence.internal.security.PrivilegedAccessHelper.getClassForName(defaultReadAllQueryRedirectorClassName,true,classLoader);
        setDefaultReadAllQueryRedirector((QueryRedirector)org.eclipse.persistence.internal.security.PrivilegedAccessHelper.newInstanceFromClass(redirectorClass));
      }
    }
 catch (    ClassNotFoundException exc) {
      throw ValidationException.classNotFoundWhileConvertingClassNames(defaultReadAllQueryRedirectorClassName,exc);
    }
catch (    Exception e) {
      throw ValidationException.classNotFoundWhileConvertingClassNames(defaultReadAllQueryRedirectorClassName,e);
    }
  }
  if (this.defaultReportQueryRedirectorClassName != null) {
    try {
      if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()) {
        try {
          redirectorClass=(Class)AccessController.doPrivileged(new PrivilegedClassForName(defaultReportQueryRedirectorClassName,true,classLoader));
        }
 catch (        PrivilegedActionException exception) {
          throw ValidationException.classNotFoundWhileConvertingClassNames(defaultReportQueryRedirectorClassName,exception.getException());
        }
        try {
          setDefaultReportQueryRedirector((QueryRedirector)AccessController.doPrivileged(new PrivilegedNewInstanceFromClass(redirectorClass)));
        }
 catch (        PrivilegedActionException exception) {
          throw ValidationException.classNotFoundWhileConvertingClassNames(defaultReportQueryRedirectorClassName,exception.getException());
        }
      }
 else {
        redirectorClass=org.eclipse.persistence.internal.security.PrivilegedAccessHelper.getClassForName(defaultReportQueryRedirectorClassName,true,classLoader);
        setDefaultReportQueryRedirector((QueryRedirector)org.eclipse.persistence.internal.security.PrivilegedAccessHelper.newInstanceFromClass(redirectorClass));
      }
    }
 catch (    ClassNotFoundException exc) {
      throw ValidationException.classNotFoundWhileConvertingClassNames(defaultReportQueryRedirectorClassName,exc);
    }
catch (    Exception e) {
      throw ValidationException.classNotFoundWhileConvertingClassNames(defaultReportQueryRedirectorClassName,e);
    }
  }
  if (this.defaultInsertObjectQueryRedirectorClassName != null) {
    try {
      if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()) {
        try {
          redirectorClass=(Class)AccessController.doPrivileged(new PrivilegedClassForName(defaultInsertObjectQueryRedirectorClassName,true,classLoader));
        }
 catch (        PrivilegedActionException exception) {
          throw ValidationException.classNotFoundWhileConvertingClassNames(defaultInsertObjectQueryRedirectorClassName,exception.getException());
        }
        try {
          setDefaultInsertObjectQueryRedirector((QueryRedirector)AccessController.doPrivileged(new PrivilegedNewInstanceFromClass(redirectorClass)));
        }
 catch (        PrivilegedActionException exception) {
          throw ValidationException.classNotFoundWhileConvertingClassNames(defaultInsertObjectQueryRedirectorClassName,exception.getException());
        }
      }
 else {
        redirectorClass=org.eclipse.persistence.internal.security.PrivilegedAccessHelper.getClassForName(defaultInsertObjectQueryRedirectorClassName,true,classLoader);
        setDefaultInsertObjectQueryRedirector((QueryRedirector)org.eclipse.persistence.internal.security.PrivilegedAccessHelper.newInstanceFromClass(redirectorClass));
      }
    }
 catch (    ClassNotFoundException exc) {
      throw ValidationException.classNotFoundWhileConvertingClassNames(defaultInsertObjectQueryRedirectorClassName,exc);
    }
catch (    Exception e) {
      throw ValidationException.classNotFoundWhileConvertingClassNames(defaultInsertObjectQueryRedirectorClassName,e);
    }
  }
  if (this.defaultUpdateObjectQueryRedirectorClassName != null) {
    try {
      if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()) {
        try {
          redirectorClass=(Class)AccessController.doPrivileged(new PrivilegedClassForName(defaultUpdateObjectQueryRedirectorClassName,true,classLoader));
        }
 catch (        PrivilegedActionException exception) {
          throw ValidationException.classNotFoundWhileConvertingClassNames(defaultUpdateObjectQueryRedirectorClassName,exception.getException());
        }
        try {
          setDefaultUpdateObjectQueryRedirector((QueryRedirector)AccessController.doPrivileged(new PrivilegedNewInstanceFromClass(redirectorClass)));
        }
 catch (        PrivilegedActionException exception) {
          throw ValidationException.classNotFoundWhileConvertingClassNames(defaultUpdateObjectQueryRedirectorClassName,exception.getException());
        }
      }
 else {
        redirectorClass=org.eclipse.persistence.internal.security.PrivilegedAccessHelper.getClassForName(defaultUpdateObjectQueryRedirectorClassName,true,classLoader);
        setDefaultUpdateObjectQueryRedirector((QueryRedirector)org.eclipse.persistence.internal.security.PrivilegedAccessHelper.newInstanceFromClass(redirectorClass));
      }
    }
 catch (    ClassNotFoundException exc) {
      throw ValidationException.classNotFoundWhileConvertingClassNames(defaultUpdateObjectQueryRedirectorClassName,exc);
    }
catch (    Exception e) {
      throw ValidationException.classNotFoundWhileConvertingClassNames(defaultUpdateObjectQueryRedirectorClassName,e);
    }
  }
  if (this.defaultDeleteObjectQueryRedirectorClassName != null) {
    try {
      if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()) {
        try {
          redirectorClass=(Class)AccessController.doPrivileged(new PrivilegedClassForName(defaultDeleteObjectQueryRedirectorClassName,true,classLoader));
        }
 catch (        PrivilegedActionException exception) {
          throw ValidationException.classNotFoundWhileConvertingClassNames(defaultDeleteObjectQueryRedirectorClassName,exception.getException());
        }
        try {
          setDefaultDeleteObjectQueryRedirector((QueryRedirector)AccessController.doPrivileged(new PrivilegedNewInstanceFromClass(redirectorClass)));
        }
 catch (        PrivilegedActionException exception) {
          throw ValidationException.classNotFoundWhileConvertingClassNames(defaultDeleteObjectQueryRedirectorClassName,exception.getException());
        }
      }
 else {
        redirectorClass=org.eclipse.persistence.internal.security.PrivilegedAccessHelper.getClassForName(defaultDeleteObjectQueryRedirectorClassName,true,classLoader);
        setDefaultDeleteObjectQueryRedirector((QueryRedirector)org.eclipse.persistence.internal.security.PrivilegedAccessHelper.newInstanceFromClass(redirectorClass));
      }
    }
 catch (    ClassNotFoundException exc) {
      throw ValidationException.classNotFoundWhileConvertingClassNames(defaultDeleteObjectQueryRedirectorClassName,exc);
    }
catch (    Exception e) {
      throw ValidationException.classNotFoundWhileConvertingClassNames(defaultDeleteObjectQueryRedirectorClassName,e);
    }
  }
  Iterator mappings=getMappings().iterator();
  while (mappings.hasNext()) {
    ((DatabaseMapping)mappings.next()).convertClassNamesToClasses(classLoader);
  }
  if (this.inheritancePolicy != null) {
    this.inheritancePolicy.convertClassNamesToClasses(classLoader);
  }
  if (this.interfacePolicy != null) {
    this.interfacePolicy.convertClassNamesToClasses(classLoader);
  }
  if (this.instantiationPolicy != null) {
    this.instantiationPolicy.convertClassNamesToClasses(classLoader);
  }
  if (hasCMPPolicy()) {
    getCMPPolicy().convertClassNamesToClasses(classLoader);
  }
  if (this.queryManager != null) {
    this.queryManager.convertClassNamesToClasses(classLoader);
  }
}