You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by pb...@apache.org on 2002/12/03 08:26:58 UTC

cvs commit: xml-fop/src/org/apache/fop/fo PropNames.java

pbwest      2002/12/02 23:26:58

  Modified:    src/org/apache/fop/fo Tag: FOP_0-20-0_Alt-Design
                        PropNames.java
  Log:
  Add PropertyException to getPropertyIndex when name is unknown.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.10  +10 -4     xml-fop/src/org/apache/fop/fo/Attic/PropNames.java
  
  Index: PropNames.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/Attic/PropNames.java,v
  retrieving revision 1.1.2.9
  retrieving revision 1.1.2.10
  diff -u -r1.1.2.9 -r1.1.2.10
  --- PropNames.java	31 Oct 2002 01:56:47 -0000	1.1.2.9
  +++ PropNames.java	3 Dec 2002 07:26:58 -0000	1.1.2.10
  @@ -773,13 +773,19 @@
       }
   
       /**
  +     * Get the property index of a property name.
        * @param propindex <tt>int</tt> index of the FO property.
        * @return <tt>String</tt> name of the indexd FO property.
        * @exception PropertyException if the property index is invalid.
        */
       public static int getPropertyIndex(String name)
  +        throws PropertyException
       {
  -        return ((Integer)(toIndex.get(name))).intValue();
  +        Integer intg = (Integer)(toIndex.get(name));
  +        if (intg == null)
  +            throw new PropertyException
  +                                ("Property name '" + name + "' is unknown.");
  +        return intg.intValue();
       }
   
   }
  
  
  

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