This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug java/20978] New: Failure to detect unhandled exception


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]