mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-28 01:55:16 +08:00
3a9e1959df
* libjava.lang/stub.xfail: New file. * libjava.lang/pr83.xfail: New file. * libjava.lang/err8.xfail: New file. * libjava.lang/err7.xfail: New file. * libjava.lang/Shazam.xfail: New file. * libjava.lang/err11.xfail: New file. * libjava.lang/instinit2.java: Renamed class to `instinit2'. * libjava.lang/anon3.out: Fixed typo. * libjava.lang/Class_1.java (main): Uncommented out previously failing code; now it works From-SVN: r38297
32 lines
806 B
Java
32 lines
806 B
Java
// Class instinit2
|
|
// Generated on Wed Feb 2 17:52:49 PST 2000
|
|
// The instance initializer throws a checked exception. This is OK
|
|
// since the constructors declares it in its `throws' clause -- at
|
|
// least that's what the specs are saying.
|
|
|
|
class instinit2 {
|
|
|
|
String buffer = "Oink Oink!";
|
|
|
|
{
|
|
System.out.println ("Checking the oink...");
|
|
if (buffer != null)
|
|
throw new Exception ("It just oinked");
|
|
}
|
|
|
|
instinit2 () throws Exception
|
|
{
|
|
System.out.println ("Ctor");
|
|
}
|
|
|
|
public static void main (String[] arg)
|
|
{
|
|
System.out.println ("Testing class `instinit2'...");
|
|
try {
|
|
System.out.println (new instinit2 ().buffer);
|
|
} catch (Exception e) {
|
|
System.out.println (e.toString());
|
|
}
|
|
}
|
|
}
|