You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Brendon Anderson (JIRA)" <ji...@apache.org> on 2016/04/20 18:55:25 UTC
[jira] [Created] (GROOVY-7821) @CompileStatic and exception list
throws ClassCastException
Brendon Anderson created GROOVY-7821:
----------------------------------------
Summary: @CompileStatic and exception list throws ClassCastException
Key: GROOVY-7821
URL: https://issues.apache.org/jira/browse/GROOVY-7821
Project: Groovy
Issue Type: Bug
Affects Versions: 2.4.6
Environment: OSX, java version "1.8.0_40"
Reporter: Brendon Anderson
Priority: Minor
{code:title=Bar.java|borderStyle=solid}
@Slf4j
@CompileStatic
class TestException {
static void main(String[] args) {
try {
throw new NullPointerException('ahh!')
} catch (NullPointerException | IOException e) {
log.error('error {}', e.message)
}
}
}
{code}
This throws a ClassCastException:
{noformat}
Exception in thread "main" java.lang.ClassCastException: java.lang.NullPointerException cannot be cast to java.io.IOException
{noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)