xalan-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ig...@apache.org
Subject cvs commit: xml-xalan/java/src/org/apache/xalan/xsltc/trax TransformerImpl.java
Date Mon, 23 Feb 2004 21:33:15 GMT
igorh       2004/02/23 13:33:15

  Modified:    test/java/src/org/apache/qetest/trax ParameterTest.java
               java/src/org/apache/xalan/res XSLTErrorResources.java
               java/src/org/apache/xalan/transformer
                        TransformerIdentityImpl.java TransformerImpl.java
               java/src/org/apache/xalan/xsltc/compiler/util ErrorMsg.java
               java/src/org/apache/xalan/xsltc/trax TransformerImpl.java
  Log:
  Patch for Bugzilla Bug 25368 submitted by Joanne Tong
  
  Revision  Changes    Path
  1.8       +4 -4      xml-xalan/test/java/src/org/apache/qetest/trax/ParameterTest.java
  
  Index: ParameterTest.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/test/java/src/org/apache/qetest/trax/ParameterTest.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- ParameterTest.java	17 Feb 2004 17:30:10 -0000	1.7
  +++ ParameterTest.java	23 Feb 2004 21:33:14 -0000	1.8
  @@ -156,12 +156,12 @@
               "<outt>false-notset,true-blank,false-a,false-1,</outt>",
               "(12a)Select expr of a param blank string"
           },
  -        { 
  +        /*{ 
               "t1", 
               null,
               "<outt>false-notset,false-blank,false-a,false-1,</outt>",
               "(12b)Select expr of a null"
  -        },
  +        },*/
           { 
               "p1", 
               "'foo'",
  
  
  
  1.44      +8 -1      xml-xalan/java/src/org/apache/xalan/res/XSLTErrorResources.java
  
  Index: XSLTErrorResources.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/res/XSLTErrorResources.java,v
  retrieving revision 1.43
  retrieving revision 1.44
  diff -u -r1.43 -r1.44
  --- XSLTErrorResources.java	16 Feb 2004 19:14:07 -0000	1.43
  +++ XSLTErrorResources.java	23 Feb 2004 21:33:14 -0000	1.44
  @@ -397,6 +397,7 @@
   	 "ER_FUNCTION_NOT_FOUND"; 
     public static final String ER_CANT_HAVE_CONTENT_AND_SELECT = 
        "ER_CANT_HAVE_CONTENT_AND_SELECT";
  +  public static final String ER_INVALID_SET_PARAM_VALUE = "ER_INVALID_SET_PARAM_VALUE";
   
        
     public static final String WG_FOUND_CURLYBRACE = "WG_FOUND_CURLYBRACE";
     public static final String WG_COUNT_ATTRIB_MATCHES_NO_ANCESTOR = 
  @@ -2118,6 +2119,12 @@
       { ER_CANT_HAVE_CONTENT_AND_SELECT,
        "The {0} element must not have both content and a select attribute."},
   
  +    // Note to translators:  This message indicates that the value argument
  +    // of setParameter must be a valid Java Object.
  +//  ER_INVALID_SET_PARAM_VALUE
  +//  public static final int ER_INVALID_SET_PARAM_VALUE = 256;
  +    { ER_INVALID_SET_PARAM_VALUE,
  +     "The value of param {0} must be a valid Java Object"},
   
   
   
  
  
  
  1.31      +5 -2      xml-xalan/java/src/org/apache/xalan/transformer/TransformerIdentityImpl.java
  
  Index: TransformerIdentityImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/transformer/TransformerIdentityImpl.java,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- TransformerIdentityImpl.java	18 Feb 2004 22:32:08 -0000	1.30
  +++ TransformerIdentityImpl.java	23 Feb 2004 21:33:14 -0000	1.31
  @@ -492,7 +492,10 @@
      */
     public void setParameter(String name, Object value)
     {
  -
  +    if (value == null) {
  +      throw new IllegalArgumentException(XSLMessages.createMessage(XSLTErrorResources.ER_INVALID_SET_PARAM_VALUE,
new Object[]{name}));
  +    }
  +    
       if (null == m_params)
       {
         m_params = new Hashtable();
  
  
  
  1.158     +5 -1      xml-xalan/java/src/org/apache/xalan/transformer/TransformerImpl.java
  
  Index: TransformerImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/transformer/TransformerImpl.java,v
  retrieving revision 1.157
  retrieving revision 1.158
  diff -u -r1.157 -r1.158
  --- TransformerImpl.java	18 Feb 2004 22:32:08 -0000	1.157
  +++ TransformerImpl.java	23 Feb 2004 21:33:14 -0000	1.158
  @@ -1491,6 +1491,10 @@
      */
     public void setParameter(String name, Object value)
     {
  +    
  +    if (value == null) {
  +      throw new IllegalArgumentException(XSLMessages.createMessage(XSLTErrorResources.ER_INVALID_SET_PARAM_VALUE,
new Object[]{name}));
  +    }    
   
       StringTokenizer tokenizer = new StringTokenizer(name, "{}", false);
   
  
  
  
  1.24      +3 -2      xml-xalan/java/src/org/apache/xalan/xsltc/compiler/util/ErrorMsg.java
  
  Index: ErrorMsg.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/util/ErrorMsg.java,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- ErrorMsg.java	16 Feb 2004 22:26:45 -0000	1.23
  +++ ErrorMsg.java	23 Feb 2004 21:33:15 -0000	1.24
  @@ -115,7 +115,8 @@
       public static final String JAXP_UNKNOWN_PROP_ERR = "JAXP_UNKNOWN_PROP_ERR";
       public static final String SAX2DOM_ADAPTER_ERR = "SAX2DOM_ADAPTER_ERR";
       public static final String XSLTC_SOURCE_ERR = "XSLTC_SOURCE_ERR";
  -    public static final String ER_RESULT_NULL = "ER_RESULT_NULL";    
  +    public static final String ER_RESULT_NULL = "ER_RESULT_NULL";
  +    public static final String JAXP_INVALID_SET_PARAM_VALUE = "JAXP_INVALID_SET_PARAM_VALUE";
       
   
       // Command-line error messages
       public static final String COMPILE_STDIN_ERR = "COMPILE_STDIN_ERR";
  
  
  
  1.80      +8 -2      xml-xalan/java/src/org/apache/xalan/xsltc/trax/TransformerImpl.java
  
  Index: TransformerImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/trax/TransformerImpl.java,v
  retrieving revision 1.79
  retrieving revision 1.80
  diff -u -r1.79 -r1.80
  --- TransformerImpl.java	16 Feb 2004 22:57:21 -0000	1.79
  +++ TransformerImpl.java	23 Feb 2004 21:33:15 -0000	1.80
  @@ -1020,7 +1020,13 @@
        * @param name The name of the parameter
        * @param value The value to assign to the parameter
        */
  -    public void setParameter(String name, Object value) { 
  +    public void setParameter(String name, Object value) {
  +        
  +        if (value == null) {
  +            ErrorMsg err = new ErrorMsg(ErrorMsg.JAXP_INVALID_SET_PARAM_VALUE, name);
  +            throw new IllegalArgumentException(err.toString());
  +        }
  +             
   	if (_isIdentity) {
   	    if (_parameters == null) {
   		_parameters = new Hashtable();
  
  
  

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


Mime
View raw message