All pastes #162481 Raw Edit

Someone

public java v1 · immutable
·published 2006-09-06 15:48 UTC
rendered paste body
public class bug_test {    static class A {        void doThing(){            System.out.println("did thing");        }    }    public static A getA(){        return new A();    }    public static void main(String[] args) {        A a_1, a_2;      // if the first condition doesn't meet there's no need to evaulate the second as well        boolean checkCondition = (((a_1 = getA())!=null) && ((a_2 = getA())!=null));        if(checkCondition)            a_2.doThing();    }}