|
From: <jas...@us...> - 2006-07-20 05:22:57
|
Revision: 1531 Author: jasonpmorrison Date: 2006-07-19 22:22:46 -0700 (Wed, 19 Jul 2006) ViewCVS: http://svn.sourceforge.net/rubyeclipse/?rev=1531&view=rev Log Message: ----------- Holy it's-a-good-idea-to-check-for-nulls, Batman Modified Paths: -------------- branches/type_inferrence/trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/ti/util/OffsetNodeLocator.java branches/type_inferrence/trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/ti/util/ScopedNodeLocator.java Modified: branches/type_inferrence/trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/ti/util/OffsetNodeLocator.java =================================================================== --- branches/type_inferrence/trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/ti/util/OffsetNodeLocator.java 2006-07-20 04:52:38 UTC (rev 1530) +++ branches/type_inferrence/trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/ti/util/OffsetNodeLocator.java 2006-07-20 05:22:46 UTC (rev 1531) @@ -37,6 +37,8 @@ * @return Node most closely spanning the requested offset. */ public Node getNodeAtOffset(Node rootNode, int offset) { + if ( rootNode == null ) { return null; } + locatedNode = null; this.offset = offset; Modified: branches/type_inferrence/trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/ti/util/ScopedNodeLocator.java =================================================================== --- branches/type_inferrence/trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/ti/util/ScopedNodeLocator.java 2006-07-20 04:52:38 UTC (rev 1530) +++ branches/type_inferrence/trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/ti/util/ScopedNodeLocator.java 2006-07-20 05:22:46 UTC (rev 1531) @@ -36,6 +36,9 @@ * @return List of located nodes. */ public List<Node> findNodesInScope(Node rootNode, INodeAcceptor acceptor ) { + if ( rootNode == null ) { return null; } + if ( acceptor == null ) { return null; } + locatedNodes = new LinkedList<Node>(); this.acceptor = acceptor; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |