You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by sb...@apache.org on 2001/08/06 07:57:01 UTC

cvs commit: xml-xalan/java/src/org/apache/xpath VariableStack.java

sboag       01/08/05 22:57:01

  Modified:    java/src/org/apache/xpath VariableStack.java
  Log:
  Address http://nagoya.apache.org/bugzilla/show_bug.cgi?id=2972,
  where it was throwing a NPE instead of reporting that the variable
  was being accessed before it was bound (i.e. the variable was being
  accessed inside an RTF for that same variable).
  
  Revision  Changes    Path
  1.34      +3 -0      xml-xalan/java/src/org/apache/xpath/VariableStack.java
  
  Index: VariableStack.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/VariableStack.java,v
  retrieving revision 1.33
  retrieving revision 1.34
  diff -u -r1.33 -r1.34
  --- VariableStack.java	2001/07/28 00:26:00	1.33
  +++ VariableStack.java	2001/08/06 05:57:01	1.34
  @@ -299,6 +299,9 @@
       index += _cfb;
   
       XObject val = _sf[index];
  +    
  +    if(null == val)
  +      throw new TransformerException("Variable accessed before it is bound!", xctxt.getSAXLocator());
   
       // Lazy execution of variables.
       if (val.getType() == XObject.CLASS_UNRESOLVEDVARIABLE)
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org