another javac problem

Archie Cobbs archie at
Thu Jan 22 10:56:02 PST 1998

Here's another javac problem I get with the FreeBSD port of kaffe-0.9.2:

  public class FooException extends Exception {

  public class Foo {
    private static Object throwException() throws FooException {
      throw new FooException();
    public Object getObject() {
      return new Object() {
	public Object method() {
	  try {
	    return throwException();
	  } catch (FooException e) {
	    return null;


  $ javac Exception FooException must be caught, or it must be declared in the throws clause of this method.
    private static Object throwException() throws FooException {
			  ^ Exception FooException is never thrown in the body of the corresponding try statement.
	  } catch (FooException e) {
  2 errors

This compiles fine with JDK-1.1.5, so either the javac compiler had a bug
which has since been fixed or there's some kaffe specific problem.


Archie Cobbs   *   Whistle Communications, Inc.  *

More information about the kaffe mailing list