When a constructor isn't found, Classpath's java.lang.Constructor
dutifully throws InstantiationException, as per Sun's library spec.
However, the JDK itself actually throws NoSuchMethodError (not to be
confused with NoSuchMethodException).  Kaffe also throws
NoSuchMethodError.

Technically, Classpath is right, but I'm not sure whether that's more
important than matching the behaviour of Sun's JVM.

The way to fix it is to catch the NoSuchMethodException from
Constructor.newInstance, and (believe it or not) re-throw it as a
NoSuchMethodError.  Then Classpath should act just like the JDK.

--
Patrick Doyle
[EMAIL PROTECTED]


_______________________________________________
Classpath mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/classpath

Reply via email to