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

missing semicolon leads to confusing message during compilation

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Won't Fix
    • Affects Version/s: 1.2.2
    • Fix Version/s: None
    • Component/s: tools
    • Subcomponent:
    • CPU:
      x86
    • OS:
      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

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

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: