From: SourceForge.net <no...@so...> - 2003-11-24 02:07:11
|
Bugs item #847933, was opened at 2003-11-23 21:07 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=438935&aid=847933&group_id=44253 Category: Interactions Group: Annoying Status: Open Resolution: None Priority: 5 Submitted By: Fernando Pereira (fcnpereira) Assigned to: Nobody/Anonymous (nobody) Summary: Missing return in anonymous class method not detected Initial Comment: With public interface Property { public boolean holds(Node node); } and other appropriate definitions, the following n.findAll(new Property() { public boolean holds(Node n) {n.getData().equals("LI");}},ans); was accepted, only to throw an exception java.lang.NullPointerException: at TopLevel$1.holds(Unknown Source) at Internal.findAll(Internal.java:50) ... Shouldn't the interactions interpreter check that the declared type of the method in the anonymous class is matched by the body of the method? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=438935&aid=847933&group_id=44253 |