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/14 23:32:00 UTC
[jira] [Created] (NETBEANS-3695) not proper to use a static
variable through a reference
Brad Walker created NETBEANS-3695:
-------------------------------------
Summary: 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
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