|
From: <cr...@us...> - 2008-04-19 07:20:45
|
Revision: 3977
http://jnode.svn.sourceforge.net/jnode/?rev=3977&view=rev
Author: crawley
Date: 2008-04-19 00:20:43 -0700 (Sat, 19 Apr 2008)
Log Message:
-----------
Fix bug which caused Class.simpleName() to throw a bogus security exception
when called from unprivileged code.
Modified Paths:
--------------
trunk/core/src/classpath/vm/java/lang/Class.java
Modified: trunk/core/src/classpath/vm/java/lang/Class.java
===================================================================
--- trunk/core/src/classpath/vm/java/lang/Class.java 2008-04-19 03:27:10 UTC (rev 3976)
+++ trunk/core/src/classpath/vm/java/lang/Class.java 2008-04-19 07:20:43 UTC (rev 3977)
@@ -361,7 +361,9 @@
}
static String getSimpleName(Class klass) {
- if (klass.getVmClass().isArray()){
+// if (klass.getVmClass().isArray()){
+ // The above involves a security check that is not appropriate in this context.
+ if (klass.vmClass.isArray()){
return klass.getComponentType().getSimpleName() + "[]";
}
String fullName = klass.getName();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|