[Bug java/35020] New: Class.getSimpleName() differs from Sun Java

2008-01-29 Thread gcc-bugzilla at matthew dot ath dot cx
Test Code:

public class test
{
   class inner
   {
   }
   public static void main(String[] args)
   {
  System.out.println(inner.class.getSimpleName());
   }
}

Result with GCJ:

[EMAIL PROTECTED]:/root# java test
test$inner

Result with Sun:

[EMAIL PROTECTED]:/opt/sid/root $ sudo java test
inner

GCJ version 4.3-20080116-1

Sun version 1.6.0.00


-- 
   Summary: Class.getSimpleName() differs from Sun Java
   Product: gcc
   Version: 4.3.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: java
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: gcc-bugzilla at matthew dot ath dot cx


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35020



[Bug java/34444] New: Class.getEnclosingClass() returns null on enclosed class

2007-12-12 Thread gcc-bugzilla at matthew dot ath dot cx
Class.getEnclosingClass() returns null on enclosed class.

Specifically:

   c = class org.freedesktop.DBus$Local$Disconnected
   c.getEnclosingClass() = null

   (followed by a null pointer exception on the next line)

Code which prints that:

   if (Debug.debug) Debug.print(Debug.VERBOSE, "c = "+c);
if (Debug.debug) Debug.print(Debug.VERBOSE, "c.getEnclosingClass() =
"+c.getEnclosingClass());
if (Debug.debug) Debug.print(Debug.VERBOSE,
"c.getEnclosingClass().getAnnotation(DBusInterfaceName.class) =
"+c.getEnclosingClass().getAnnotation(DBusInterfaceName.class));
 if (null !=
c.getEnclosingClass().getAnnotation(DBusInterfaceName.class))

Source for DBus$Local$Disconnected:

public interface DBus extends DBusInterface
{

 

   /**
* Messages generated locally in the application.
*/
   public interface Local extends DBusInterface
   {
  public class Disconnected extends DBusSignal
  {
 public Disconnected(String path) throws DBusException
 {
super(path);
 }
  }
   }

  
}

GCC version:

gcc (GCC) 4.2.3 20071123 (prerelease) (Debian 4.2.2-4)

(Also happens in 4.2.2)

This code works as expected in Sun JDK 5 and 6

Matt


-- 
   Summary: Class.getEnclosingClass() returns null on enclosed class
   Product: gcc
   Version: 4.3.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: java
AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: gcc-bugzilla at matthew dot ath dot cx
 GCC build triplet: i486-linux-gnu
  GCC host triplet: i486-linux-gnu
GCC target triplet: i486-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3