natClass.cc (initializeClass): Re-throw SecurityExceptions.
2007-01-26 Andrew Haley <aph@redhat.com> * java/lang/natClass.cc (initializeClass): Re-throw SecurityExceptions. * java/lang/natVMClassLoader.cc (loadClass): checkPackageAccess. * java/lang/ClassLoader.java: (loadClass): Likewise. From-SVN: r121285
This commit is contained in:
@@ -50,6 +50,7 @@ details. */
|
||||
#include <java/lang/NullPointerException.h>
|
||||
#include <java/lang/RuntimePermission.h>
|
||||
#include <java/lang/System.h>
|
||||
#include <java/lang/SecurityException.h>
|
||||
#include <java/lang/SecurityManager.h>
|
||||
#include <java/lang/StringBuffer.h>
|
||||
#include <java/lang/VMClassLoader.h>
|
||||
@@ -690,6 +691,10 @@ java::lang::Class::initializeClass (void)
|
||||
{
|
||||
_Jv_Linker::wait_for_state(this, JV_STATE_LINKED);
|
||||
}
|
||||
catch (java::lang::SecurityException *x)
|
||||
{
|
||||
throw x;
|
||||
}
|
||||
catch (java::lang::Throwable *x)
|
||||
{
|
||||
// Turn into a NoClassDefFoundError.
|
||||
@@ -727,6 +732,10 @@ java::lang::Class::initializeClass (void)
|
||||
{
|
||||
_Jv_InitClass (superclass);
|
||||
}
|
||||
catch (java::lang::SecurityException *x)
|
||||
{
|
||||
throw x;
|
||||
}
|
||||
catch (java::lang::Throwable *except)
|
||||
{
|
||||
// Caught an exception.
|
||||
@@ -745,6 +754,10 @@ java::lang::Class::initializeClass (void)
|
||||
if (meth)
|
||||
((void (*) (void)) meth->ncode) ();
|
||||
}
|
||||
catch (java::lang::SecurityException *x)
|
||||
{
|
||||
throw x;
|
||||
}
|
||||
catch (java::lang::Throwable *except)
|
||||
{
|
||||
if (! java::lang::Error::class$.isInstance(except))
|
||||
|
||||
Reference in New Issue
Block a user