Cross Reference: Neg01eff_final.java
xref
: /
openjdk7
/
langtools
/
test
/
tools
/
javac
/
multicatch
/
Neg01eff_final.java
Home
History
Annotate
Line#
Navigate
Download
Search
only in
./
734
N/A
/*
734
N/A
* @test /nodynamiccopyright/
734
N/A
* @bug 6943289
734
N/A
*
734
N/A
* @summary Project Coin: Improved Exception Handling for Java (aka 'multicatch')
734
N/A
* @author darcy
734
N/A
* @
compile
/
fail
/
ref
=Neg01eff_final.out -XDrawDiagnostics
Neg01eff_final.java
734
N/A
* @compile -source 6 -XDrawDiagnostics
Neg01eff_final.java
734
N/A
*
734
N/A
*/
734
N/A
734
N/A
class
Neg01eff_final
{
734
N/A
static
class
A
extends
Exception
{}
734
N/A
static
class
B1
extends
A {}
734
N/A
static
class
B2
extends
A {}
734
N/A
734
N/A
class
Test
{
734
N/A
void
m()
throws
A {
734
N/A
try
{
734
N/A
throw
new
B1
();
734
N/A
}
catch
(A
ex1
) {
734
N/A
try
{
734
N/A
throw
ex1
;
// used to throw A, now throws B1!
734
N/A
}
catch
(
B2
ex2
) { }
//unreachable
734
N/A
}
734
N/A
}
734
N/A
}
734
N/A
}