mkwan       2002/09/13 10:50:25

  Modified:    java/src/org/apache/xalan/transformer TransformerImpl.java
               java/src/org/apache/xalan/templates OutputProperties.java
  Log:
  For Bugzilla 12379. Transformer.setOutputProperties() should throw
  IllegalArgumentException if the property is invalid.
  
  Revision  Changes    Path
  1.134     +7 -0      
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.133
  retrieving revision 1.134
  diff -u -r1.133 -r1.134
  --- TransformerImpl.java      10 Jun 2002 19:24:42 -0000      1.133
  +++ TransformerImpl.java      13 Sep 2002 17:50:24 -0000      1.134
  @@ -899,8 +899,15 @@
      * @param oformat A set of output properties that will be
      * used to override any of the same properties in effect
      * for the transformation.
  +   *
  +   * @see javax.xml.transform.OutputKeys
  +   * @see java.util.Properties
  +   *
  +   * @throws IllegalArgumentException if any of the argument keys are not
  +   * recognized and are not namespace qualified.   
      */
     public void setOutputProperties(Properties oformat)
  +             throws IllegalArgumentException
     {
   
       synchronized (m_reentryGuard)
  
  
  
  1.21      +4 -0      
xml-xalan/java/src/org/apache/xalan/templates/OutputProperties.java
  
  Index: OutputProperties.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/templates/OutputProperties.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- OutputProperties.java     28 Jul 2001 00:25:58 -0000      1.20
  +++ OutputProperties.java     13 Sep 2002 17:50:24 -0000      1.21
  @@ -909,6 +909,10 @@
       while (enum.hasMoreElements())
       {
         String key = (String) enum.nextElement();
  +    
  +      if (!isLegalPropertyKey(key))
  +        throw new 
IllegalArgumentException(XSLMessages.createMessage(XSLTErrorResources.ER_OUTPUT_PROPERTY_NOT_RECOGNIZED,
 new Object[]{key})); //"output property not recognized: "
  +      
         Object oldValue = m_properties.get(key);
         if (null == oldValue)
         {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to