1114 |
} |
} |
1115 |
if (constructor == null) |
if (constructor == null) |
1116 |
throw new InstantiationException(getName()); |
throw new InstantiationException(getName()); |
1117 |
if (!Modifier.isPublic(constructor.getModifiers())) |
if (!Modifier.isPublic(constructor.getModifiers()) |
1118 |
|
|| !Modifier.isPublic(getModifiers())) |
1119 |
{ |
{ |
1120 |
final Constructor finalConstructor = constructor; |
final Constructor finalConstructor = constructor; |
1121 |
AccessController.doPrivileged(new PrivilegedAction() { |
AccessController.doPrivileged(new PrivilegedAction() |
1122 |
public Object run() { |
{ |
1123 |
|
public Object run() |
1124 |
|
{ |
1125 |
finalConstructor.setAccessible(true); |
finalConstructor.setAccessible(true); |
1126 |
return null; |
return null; |
1127 |
} |
} |
1134 |
} |
} |
1135 |
} |
} |
1136 |
int modifiers = constructor.getModifiers(); |
int modifiers = constructor.getModifiers(); |
1137 |
if (!Modifier.isPublic(modifiers)) |
if (!Modifier.isPublic(modifiers) |
1138 |
|
|| !Modifier.isPublic(getModifiers())) |
1139 |
{ |
{ |
1140 |
Class caller = VMStackWalker.getCallingClass(); |
Class caller = VMStackWalker.getCallingClass(); |
1141 |
if (caller != null && |
if (caller != null && |