Jtest logo




Contents  Previous  Next  Index

NAMING.USF


Use only uppercase letters and underscores when naming "final" "static" fields

Description

This rule flags any "final" "static" field that has an unconventional name format.

Use only uppercase letters and underscores when naming "final" "static" fields (i.e. named constants).

Example

 package NAMING;
 
 class USF {
     public static final int size = 10;  // Violation
 }

Repair

 class USF_fixed {
     public static final int SIZE = 10;
 }

Reference

Java Language Specification, section 6.8.5.


Contents  Previous  Next  Index

ParaSoft logo
(888) 305-0041 info@parasoft.com Copyright © 1996-2001 ParaSoft