public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
From: "gcc-bugzilla at matthew dot ath dot cx" <gcc-bugzilla@gcc.gnu.org>
To: java-prs@gcc.gnu.org
Subject: [Bug java/34444]  New: Class.getEnclosingClass() returns null on enclosed class
Date: Wed, 12 Dec 2007 10:49:00 -0000	[thread overview]
Message-ID: <bug-34444-15511@http.gcc.gnu.org/bugzilla/> (raw)

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=34444


             reply	other threads:[~2007-12-12 10:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-12 10:49 gcc-bugzilla at matthew dot ath dot cx [this message]
2007-12-12 16:29 ` [Bug java/34444] " tromey at gcc dot gnu dot org
2008-01-04 14:42 ` aph at gcc dot gnu dot org
2008-01-04 17:19 ` [Bug libgcj/34444] " aph at gcc dot gnu dot org
2008-01-04 17:19 ` aph at gcc dot gnu dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-34444-15511@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=java-prs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).