Jtest logo




Contents  Previous  Next  Index

INIT.SF


Explicitly initialize all "static" fields

Description

This rule flags any uninitialized static field in your methods.

Example

 package INIT;
 
 class SF
 {
     SF () {}
 
     static private int K;
     static private int L;  // 'L' is not initialized
 
     static {
         K = 10;
     }
 }

Repair

These errors can be corrected by initializing the appropriate static field.


Contents  Previous  Next  Index

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