if (refs != null) {
if (names != null) {
    public int getSize() throws Exception {        int size = 0;        Array refs = getReferences();        if (refs != null) {            size = refs.getSize();        } else {            throw new Exception("Could not get size. The references is null.");        }        return size;    }