Thursday, March 22, 2007

How not to code 2...

Another example of how not to code - I came across this sample today

    public static boolean isNull(Object obj) {
        logger.trace(6 , "isNull() starts...");
        if (null == obj) { return true; }
        logger.trace(6 , "isNull() ends...");
        return false;
    }

First of all, Why....

Ok, now what tangible benefit is achieved? Any inputs ...

Note - Programming language is Java 2 (Java SDK version 1.4.2)

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home