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

not proper to use a static variable through a reference

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 11.3
    • None

    Description

      It's really not proper to use a static variable through a reference because they can't be derived. The proper thing to do is use them with a Class name..

         [repeat] /home/bwalker/src/netbeans/java/java.hints.ui/src/org/netbeans/modules/java/hints/spiimpl/refactoring/ConfigurationsComboModel.java:175: warning: [static] static variable should be qualified by type name, KeyEvent, instead of by an expression
         [repeat]             if (ke.getKeyCode() == ke.VK_ENTER || ke.getKeyCode() == ke.VK_ESCAPE) {
         [repeat]                                      ^
         [repeat] /home/bwalker/src/netbeans/java/java.hints.ui/src/org/netbeans/modules/java/hints/spiimpl/refactoring/ConfigurationsComboModel.java:175: warning: [static] static variable should be qualified by type name, KeyEvent, instead of by an expression
         [repeat]             if (ke.getKeyCode() == ke.VK_ENTER || ke.getKeyCode() == ke.VK_ESCAPE) {
         [repeat] 
      

      ^
      This change fixes that..

      Attachments

        Issue Links

          Activity

            People

              brad.walker Brad Walker
              brad.walker Brad Walker
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 2h 40m
                  2h 40m