morten      01/09/25 06:10:54

  Modified:    java/src/org/apache/xalan/xsltc/runtime BasisLibrary.java
  Log:
  Optimisation for string-2-int and real-2-int conversions.
  PR:           bugzilla 3448
  Obtained from:        n/a
  Submitted by: John Howard ([EMAIL PROTECTED])
  Reviewed by:  [EMAIL PROTECTED]
  
  Revision  Changes    Path
  1.16      +4 -4      
xml-xalan/java/src/org/apache/xalan/xsltc/runtime/BasisLibrary.java
  
  Index: BasisLibrary.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/runtime/BasisLibrary.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- BasisLibrary.java 2001/09/20 14:55:42     1.15
  +++ BasisLibrary.java 2001/09/25 13:10:54     1.16
  @@ -1,5 +1,5 @@
   /*
  - * @(#)$Id: BasisLibrary.java,v 1.15 2001/09/20 14:55:42 morten Exp $
  + * @(#)$Id: BasisLibrary.java,v 1.16 2001/09/25 13:10:54 morten Exp $
    *
    * The Apache Software License, Version 1.1
    *
  @@ -60,6 +60,7 @@
    * @author Santiago Pericas-Geertsen
    * @author Morten Jorgensen
    * @author Erwin Bolwidt <[EMAIL PROTECTED]>
  + * @author John Howard <[EMAIL PROTECTED]>
    *
    */
   
  @@ -797,7 +798,7 @@
        */
       public static int stringToInt(String s) {
        try {
  -         return Integer.valueOf(s).intValue();
  +         return Integer.parseInt(s);
        }
        catch (NumberFormatException e) {
            return(-1); // ???
  @@ -821,8 +822,7 @@
        * Utility function: used in RealType to convert a real to an integer
        */
       public static int realToInt(double d) {
  -     final Double result = new Double(d);
  -     return result.intValue();
  +     return (int)d;
       }
   
       /**
  
  
  

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

Reply via email to