Re: svn commit: r605850 - in /cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne: ./ access/ access/jdbc/ access/types/ dba/ dba/openbase/ dba/oracle/ dba/sqlite/ dba/sqlserver/ exp/parser/ query/ reflect/ util/ wocompat/

From: Craig L Russell (Craig.Russel..un.COM)
Date: Sat Dec 29 2007 - 17:30:32 EST

  • Next message: Michael Gentry: "Re: svn commit: r605850 - in /cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne: ./ access/ access/jdbc/ access/types/ dba/ dba/openbase/ dba/oracle/ dba/sqlite/ dba/sqlserver/ exp/parser/ query/ reflect/ util/"

    I didn't see a reply to this one.

    On Dec 20, 2007, at 1:47 AM, Aristedes Maniatis wrote:

    >
    > On 20/12/2007, at 8:44 PM, torehalse..pache.org wrote:
    >
    >> java 5: new Integer(int) -> Integer.valueOf(int)
    >
    > Or we could start to use autoboxing and just use "int" where
    > appropriate. Is valueOf recommended over new Integer() for speed or
    > other reasons in Java 5?

    Yes, it's recommended. The valueOf method returns an instance that
    might already be lying around whereas new Integer will always create
    an object that will have to be garbage collected later. So valueOf is
    preferable if the code will always be run in a Java 5 or better vm.

    Craig
    >
    > Ari
    >
    >
    >
    > -------------------------->
    > Aristedes Maniatis
    > phone +61 2 9660 9700
    > PGP fingerprint 08 57 20 4B 80 69 59 E2 A9 BF 2D 48 C2 20 0C C8
    >
    >

    Craig Russell
    Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
    408 276-5638 mailto:Craig.Russel..un.com
    P.S. A good JDO? O, Gasp!





    This archive was generated by hypermail 2.0.0 : Sat Dec 29 2007 - 17:31:26 EST