Cross Reference: Neg03.java
xref
: /
openjdk7
/
langtools
/
test
/
tools
/
javac
/
multicatch
/
Neg03.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 mcimadamore
549
N/A
* @
compile
/
fail
/
ref
=Neg03.out -XDrawDiagnostics
Neg03.java
549
N/A
*
549
N/A
*/
549
N/A
549
N/A
class
Neg03
{
549
N/A
734
N/A
static
class
A
extends
Exception
{
public
void
m() {};
public
Object
f;}
734
N/A
static
class
B1
extends
A {}
734
N/A
static
class
B2
extends
A {}
734
N/A
734
N/A
void
m()
throws
B1
,
B2
{
549
N/A
try
{
549
N/A
if
(
true
) {
734
N/A
throw
new
B1
();
549
N/A
}
549
N/A
else
{
734
N/A
throw
new
B2
();
549
N/A
}
734
N/A
}
catch
(
Exception
ex
) {
734
N/A
ex
=
new
B2
();
//effectively final analysis disabled!
734
N/A
throw
ex
;
549
N/A
}
549
N/A
}
549
N/A
}