public inbox for java@gcc.gnu.org
 help / color / mirror / Atom feed
* anonymous constructor extension
@ 2002-04-03 15:56 Nic Ferrier
  2002-04-03 19:36 ` Alexandre Petit-Bianco
  0 siblings, 1 reply; 2+ messages in thread
From: Nic Ferrier @ 2002-04-03 15:56 UTC (permalink / raw)
  To: java

I'm trying to compile a Paperclips class which has an anonymous class
which extends a class.

GCJ seems to be getting itself into a mess over this, the constructor
for the class I'm extending looks like this:

  public WebApp (File warPtr, String path, Hashtable inits, LogWriter log)
    throws ServiceFailure


And the anonymous class gets created like this:

    WebApp webapp = new WebApp(docRoot, pattern, initParams, logger)
      {
	
	public void init (Host mgr)
	  throws ServiceFailure
	{
	  super.init(mgr);
	  super.ddInit(serverConfig);
	}
      };


The errors I get from the (latest) CVS are:

source/gnu/paperclips/paperclips.java: In class `gnu.paperclips.paperclips$1':
source/gnu/paperclips/paperclips.java: In constructor 
        `(gnu.paperclips.paperclips,
          gnu.paperclips.utils.XMElement,
          java.io.File,java.lang.String,
          java.util.Hashtable,
          gnu.paperclips.LogWriter)':
source/gnu/paperclips/paperclips.java:0: 
  Exception `gnu.paperclips.ServiceFailure' must be caught, or it must
  be declared in the `throws' clause of `gnu.paperclips.paperclips$1'.
   <<file too short - unexpected EOF>>
   ^                            
1 error                         


I have tried wrapping the creation of the anonymous class with a
try/catch but that doesn't work.

Judging by the <<file too short>> suggestion it seems to me that GCJ
is just broken in this regard (in that it's not properly managing
anonymous constructors with exceptions in their signatures).

Should I submit a bug?


Nic

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: anonymous constructor extension
  2002-04-03 15:56 anonymous constructor extension Nic Ferrier
@ 2002-04-03 19:36 ` Alexandre Petit-Bianco
  0 siblings, 0 replies; 2+ messages in thread
From: Alexandre Petit-Bianco @ 2002-04-03 19:36 UTC (permalink / raw)
  To: java


Nic Ferrier writes:

> Should I submit a bug?

Yes please, unless you see one in GNATS already covering the issue.

Thanks,

./A

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-04-03 23:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-03 15:56 anonymous constructor extension Nic Ferrier
2002-04-03 19:36 ` Alexandre Petit-Bianco

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).