You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by "Brad Walker (Jira)" <ji...@apache.org> on 2020/01/16 19:14:00 UTC

[jira] [Commented] (NETBEANS-3695) not proper to use a static variable through a reference

    [ https://issues.apache.org/jira/browse/NETBEANS-3695?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17017420#comment-17017420 ] 

Brad Walker commented on NETBEANS-3695:
---------------------------------------

fixed & merged..

 

> not proper to use a static variable through a reference
> -------------------------------------------------------
>
>                 Key: NETBEANS-3695
>                 URL: https://issues.apache.org/jira/browse/NETBEANS-3695
>             Project: NetBeans
>          Issue Type: Improvement
>            Reporter: Brad Walker
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 2h 40m
>  Remaining Estimate: 0h
>
> 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..
> {code:java}
>    [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] 
> {code}
>                                                                        ^
> This change fixes that..



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists