Jtest logo




Contents  Previous  Next  Index

CODSTA.VDT


Do not declare multiple variables of different types in one statement

Description

This rule flags any code where multiple variables of different types are declared in a single declaration statement.

Declaring multiple variables of different types in a single declaration statement can cause confusion.

Example

 package CODSTA;
 class VDT
 {
    public void foo() {
       int aaa, bbb[];        // Violation
       int ccc, ddd;
    }
 }
 

Repair

 package CODSTA;
 
 class VDT
 {
    public void foo() {
       int aaa;
       int bbb[];
       int ccc, ddd;
    }
 }

Contents  Previous  Next  Index

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