This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug java/20978] New: Failure to detect unhandled exception
- From: "mckinlay at redhat dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 12 Apr 2005 20:23:07 -0000
- Subject: [Bug java/20978] New: Failure to detect unhandled exception
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
In some cases GCJ fails to detect unhandled exceptions. In the code below, the
method x() is invalid because FileChannel.close() can throw an IOException. GCJ
should report an error stating that the exception must be caught or declared to
be thrown.
import java.nio.channels.*;
public class FCIO
{
FileChannel fc;
public void x()
{
fc.close();
}
}
--
Summary: Failure to detect unhandled exception
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Keywords: accepts-invalid
Severity: normal
Priority: P2
Component: java
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: mckinlay at redhat dot com
CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu
dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20978