This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Product Version: NetBeans IDE Dev (Build 201505130001) Java: 1.8.0_45; Java HotSpot(TM) 64-Bit Server VM 25.45-b02 Runtime: Java(TM) SE Runtime Environment 1.8.0_45-b14 System: Windows 7 version 6.1 running on amd64; UTF-8; pl_PL (nb) When creating a logger from a template (for example "logr") we get: private static final Logger logger = Logger.getLogger(MyClass.class.getName()); But when creating it using Insert Code -> Logger, we get: private static final Logger LOG = Logger.getLogger(Initialized.class.getName()); The latter is incorrect, because logger is not a constant, so it shouldn't have uppercase name: https://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s5.2.4-constant-names And that leads to inconsistency when some of team members use templates, and others use code generation.
Hm, I will probably introduce also a hint to check constant names with configurable 'immutable' classes. You're right that (not only) Google standards promote using uppercase just for immutables. I think some deviations should be supported, subject to project local conventions, which should be configurable per IDE/project - e.g. Logger is not really immutable, but in more than one project we've established a convention to write loggers in uppecase - mainly to emphasize its usage throughout the source code.
The name of the logger variable should be defined in IDE options or project options. See bug 252708.
Sorry, I've confused this issue (which should go to Java/Editor area) with other ones filed against Java hints regarding logging.Never mind, the 'check constant name' hint is already implemented.