void (Object parentNode) { final String parentName = parentNode == null ? null : parentNode.toString(); if ("Topics".equals(parentName)) { System.out.println(parentNode.toString()); } else if ("Queues".equals(parentName)) { System.out.println(parentNode.toString()); } System.out.println(parentNode.<warning descr="Method invocation 'toString' may produce 'NullPointerException'">toString</warning>()); }