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