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

missing semicolon leads to confusing message during compilation

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Fix
    • P4
    • None
    • 1.2.2
    • tools
    • x86
    • windows_95

    Description



      Name: skT88420 Date: 08/25/99


      I use the following code for calling a Stored procedure.

      CallableStatement cs=c.prepareCall("{?=call sp_return(?,?)}");
      .............
      .............
      cs.registerOutParameter (1,java.sql.Types.INTEGER);
      cs.setInt (2,12);
      cs.registerOutParameter (3,java.sql.Types.INTEGER);
      cs.executeUpdate();

      int i=cs.getInt(1);
      .............
      ..........

      Problem here is when i miss a semicolon accidently after cs.setInt the following message occurs:
      Invalid type expression
             cs.setInt (2,12)
      Invalid declaration
              cs.registerOutParameter (3,java.sql.Types.INTEGER);

      In other cases it gives the message ";" expected.

      It would be nice if compiler gives the same message for all missing ";" istead of giving the misleading messages like above.

      Thanks
      (Review ID: 94383)
      ======================================================================

      Attachments

        Activity

          People

            iris Iris Clark
            skonchad Sandeep Konchady
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: