re PR libgcj/35020 (Class.getSimpleName() differs from Sun Java)
2008-05-28 Andrew Haley <aph@redhat.com> * java/lang/Class.java (getSimpleName): Use getEnclosingClass(). * testsuite/libjava.lang/PR35020.java: New cases. * testsuite/libjava.lang/PR35020.out: New cases. From-SVN: r136103
This commit is contained in:
parent
38154e4f0f
commit
71292a0540
6 changed files with 53 additions and 37 deletions
Binary file not shown.
|
@ -1,21 +1,30 @@
|
|||
class outer$inner
|
||||
{
|
||||
};
|
||||
|
||||
public class PR35020
|
||||
{
|
||||
class inner
|
||||
{
|
||||
}
|
||||
public static void main(String[] args)
|
||||
{
|
||||
System.out.println(inner.class.getSimpleName());
|
||||
System.out.println(PR35020.class.getSimpleName());
|
||||
System.out.println(Class.class.getSimpleName());
|
||||
System.out.println((new int[7]).getClass().getSimpleName());
|
||||
System.out.println((new Object[1][1][1][1][1][1][1][1]).getClass().getSimpleName());
|
||||
System.out.println((new java.security.PrivilegedAction()
|
||||
{
|
||||
public Object run() {
|
||||
return null;
|
||||
}
|
||||
}).getClass().getSimpleName());
|
||||
}
|
||||
class PR35020$Inner
|
||||
{
|
||||
};
|
||||
class inner
|
||||
{
|
||||
}
|
||||
public static void main(String[] args)
|
||||
{
|
||||
System.out.println(inner.class.getSimpleName());
|
||||
System.out.println(PR35020.class.getSimpleName());
|
||||
System.out.println(Class.class.getSimpleName());
|
||||
System.out.println((new int[7]).getClass().getSimpleName());
|
||||
System.out.println((new Object[1][1][1][1][1][1][1][1]).getClass().getSimpleName());
|
||||
System.out.println((new java.security.PrivilegedAction()
|
||||
{
|
||||
public Object run() {
|
||||
return null;
|
||||
}
|
||||
}).getClass().getSimpleName());
|
||||
System.out.println(PR35020$Inner.class.getSimpleName());
|
||||
System.out.println(outer$inner.class.getSimpleName());
|
||||
System.out.println(outer$inner.inner.class.getSimpleName());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -4,3 +4,6 @@ Class
|
|||
int[]
|
||||
Object[][][][][][][][]
|
||||
|
||||
PR35020$Inner
|
||||
outer$inner
|
||||
inner
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue