Revision: 14828
          http://gate.svn.sourceforge.net/gate/?rev=14828&view=rev
Author:   markagreenwood
Date:     2011-12-21 13:53:30 +0000 (Wed, 21 Dec 2011)
Log Message:
-----------
if the leaf doesn't exist then throw a null pointer exception so the code is 
clear rather than relying on later code to fail for the message to propogate 
back up

Modified Paths:
--------------
    gate/trunk/src/gate/gui/SyntaxTreeViewer.java

Modified: gate/trunk/src/gate/gui/SyntaxTreeViewer.java
===================================================================
--- gate/trunk/src/gate/gui/SyntaxTreeViewer.java       2011-12-21 12:12:26 UTC 
(rev 14827)
+++ gate/trunk/src/gate/gui/SyntaxTreeViewer.java       2011-12-21 13:53:30 UTC 
(rev 14828)
@@ -580,7 +580,7 @@
 
         STreeNode leaf = findLeaf(annot.getStartNode(), annot.getEndNode());
         if (leaf == null) {//not found
-          Out.println("Can't find my leaf node for annotation: " + annot);
+          throw new NullPointerException("Can't find leaf node for annotation: 
" + annot);
         }
 
         JButton button = (JButton) buttons.get(new Integer(leaf.getID()));

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create 
new or port existing apps to sell to consumers worldwide. Explore the 
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
_______________________________________________
GATE-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gate-cvs

Reply via email to