Uploaded image for project: 'NetBeans'
  1. NetBeans
  2. NETBEANS-506

Add hint for final variable which might not been initialized

    XMLWordPrintableJSON

    Details

      Description

      When I have a ctor, where I initialized 2 out of 3 final variables, NetBeans shows me an error at the end of the ctor and not at the end of the variable which might not have been initialized.

      So we have 2 things here:

      First: The error/warning should appear at the variable, where that error happens.
      Second: There should be a hint while pressing alt + enter, where I can add/initialize the variable to the ctor which is already there.

      I addede a screenshot, where the error happens, which is not correct, in my opinion. Error is "Variable test might not have been initialized"

      Cheers

      Chris

        Attachments

        1. error-init-variable.png
          46 kB
          Christian Lenz

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              chrizzly Christian Lenz
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: