Jtest logo




Contents  Previous  Next  Index

NAMING.IRB


Use `is...' for naming methods that return a "boolean"

Description

This rule flags any function whose name begin with `is' that does not return a `boolean'.

Example

 package NAMING;
 
 public class IRB {
    public static boolean isOK() {
       return true;
    }
    public int isNotOK() {         // Violation
       return 1;
    }
    public int numberOK() {
       return 1;
    }
 }

Repair

Use standard naming conventions for legibility.


Contents  Previous  Next  Index

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