Jtest logo




Contents  Previous  Next  Index

CODSTA.MVOS


Do not declare multiple variables in one statement

Description

This rule flags code where multiple variables are declared in one statement. Declaring too many variables in one statement can make code confusing.

Example

 package CODSTA;
 
 class MVOS {
    public void foo() {
       int aaa, ccc;  //violation
    }
 }

Repair

 package CODSTA;
 class MVOS {
    public void foo() {
       int aaa;
       int ccc;
    }
 }

Contents  Previous  Next  Index

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