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

If catch clause has an incompatible type, error pointer points to first exception type in list

    Details

    • Subcomponent:
    • Resolved In Build:
      b123
    • CPU:
      generic
    • OS:
      generic
    • Verification:
      Verified

      Description

      If code throws an incompatible type, the little ^ pointer in the error message always points to the first Exception type in the clause. If possible, it should point to the offending type. For instance,if I put a String in the catch clause,

      neg01.java:15: incompatible types
              }catch(final ExceptionA|ExceptionB|RuntimeException|String E ) {
                           ^
        required: Throwable
        found: Serializable
      1 error

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                mcimadamore Maurizio Cimadamore
                Reporter:
                ssides Steve Sides
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: