Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-1228866

fp.bugs 2601: compiler throws getClassName error on malformed catch()

XMLWordPrintable

    • 1.1
    • sparc
    • solaris_2.3
    • Not verified

      ###@###.###
      All platforms: Compiler throws getClassName error trying to compile a malformed catch
      statement; catch( Exception(message) var)


      Steps to reproduce
      Compile the following code

      package java.net;

      import java.io.*;
      import java.net.*;
      import java.util.*;
      // import sockopt;
      import java.awt.*;
      import java.applet.Applet;


      public final class MSocket {
      PlainSocketImpl impl;

      public MSocket() throws IOException {
      System.out.println("start socket init");
      impl= new PlainSocketImpl();
      SecurityManager security = System.getSecurityManager();
      if (security!= null) {
      security.checkListen(9876);
      }
      System.out.println("doing create");
      impl.create(false);
      int tmp_addr= 0xe0027fff;
      System.out.println("addr init");
      InetAddress cur_addr= new InetAddress();
      cur_addr.address= tmp_addr;
      System.out.println("bind init");
      try {
      try {
      try {
      impl.bind(cur_addr, 9876);
      } catch(IOException("Bind Failure") e) {
      System.err.println("in Msocket, " + e.getMessage());
      e.printStackTrace();;
      throw e;
      }
      } catch(ProtocolException("Bind Failure") e) {
      System.err.println("in Msocket, " + e.getMessage());
      e.printStackTrace();;
      throw e;
      }
      } catch(SocketException("Bind Failure") e) {
      System.err.println("in Msocket, " + e.getMessage());
      e.printStackTrace();;
      throw e;
      }
      System.out.println("end of socket init");
      }

      // Close this socket
      public void close() throws IOException {
      impl.close();
      }

      // return the input stream
      public InputStream getInputStream() throws IOException {
      return impl.getInputStream();
      }

      // return the output stream
      public OutputStream getOutputStream() throws IOException {
      return impl.getOutputStream();
      }
      }




            fyellinsunw Frank Yellin (Inactive)
            kasmithsunw Kevin Smith (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: