Index: java/lang/Class.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/lang/Class.java,v
retrieving revision 1.8
diff -u -r1.8 Class.java
--- java/lang/Class.java	17 Apr 2003 12:32:29 -0000	1.8
+++ java/lang/Class.java	6 Jun 2003 06:45:08 -0000
@@ -258,16 +258,7 @@
 	}
 	if (constructor == null)
 	    throw new InstantiationException(getName());
-      }
-    int modifiers = constructor.getModifiers();
-    if (!Modifier.isPublic(modifiers))
-      {
-	Class caller = VMSecurityManager.getClassContext()[1];
-	if (caller != this &&
-	    (Modifier.isPrivate(modifiers) || getClassLoader() != caller.getClassLoader() ||
-	    !ClassHelper.getPackagePortion(getName()).equals(ClassHelper.getPackagePortion(caller.getName()))))
-	    throw new IllegalAccessException(getName() + " has an inaccessible constructor");
-	if (!constructor.isAccessible())
+	if (!Modifier.isPublic(constructor.getModifiers()))
 	  {
 	    final Constructor finalConstructor = constructor;
 	    AccessController.doPrivileged(new PrivilegedAction() {
@@ -276,12 +267,21 @@
 		    return null;
 		}
 	    });
-	    synchronized(this)
-	      {
-		if (this.constructor == null)
-		    this.constructor = constructor;
-	      }
 	  }
+	synchronized(this)
+	  {
+	    if (this.constructor == null)
+		this.constructor = constructor;
+	  }	    
+      }
+    int modifiers = constructor.getModifiers();
+    if (!Modifier.isPublic(modifiers))
+      {
+	Class caller = VMSecurityManager.getClassContext()[1];
+	if (caller != this &&
+	    (Modifier.isPrivate(modifiers) || getClassLoader() != caller.getClassLoader() ||
+	    !ClassHelper.getPackagePortion(getName()).equals(ClassHelper.getPackagePortion(caller.getName()))))
+	    throw new IllegalAccessException(getName() + " has an inaccessible constructor");
       }
     try
       {
