Author: juiceman Date: 2008-12-29 21:32:32 +0000 (Mon, 29 Dec 2008) New Revision: 24828
Modified: trunk/plugins/XMLSpider/org/garret/perst/impl/AltBtree.java trunk/plugins/XMLSpider/org/garret/perst/impl/Btree.java trunk/plugins/XMLSpider/org/garret/perst/impl/BtreeCompoundIndex.java trunk/plugins/XMLSpider/org/garret/perst/impl/BtreeMultiFieldIndex.java trunk/plugins/XMLSpider/org/garret/perst/impl/RndBtree.java trunk/plugins/XMLSpider/org/garret/perst/impl/StorageImpl.java Log: Findbugs 1.3.6 says since we are using Java 1.5 or higher we should use Short.valueOf() instead of new Short(). This seems to be the common wisdom on the Internet http://jkingdon2000.blogspot.com/2007/01/new-integer5-versus-integervalueof5.html Modified: trunk/plugins/XMLSpider/org/garret/perst/impl/AltBtree.java =================================================================== --- trunk/plugins/XMLSpider/org/garret/perst/impl/AltBtree.java 2008-12-29 21:31:20 UTC (rev 24827) +++ trunk/plugins/XMLSpider/org/garret/perst/impl/AltBtree.java 2008-12-29 21:32:32 UTC (rev 24828) @@ -418,7 +418,7 @@ } Object getKeyValue(int i) { - return new Short(data[i]); + return Short.valueOf(data[i]); } BtreePage clonePage() { Modified: trunk/plugins/XMLSpider/org/garret/perst/impl/Btree.java =================================================================== --- trunk/plugins/XMLSpider/org/garret/perst/impl/Btree.java 2008-12-29 21:31:20 UTC (rev 24827) +++ trunk/plugins/XMLSpider/org/garret/perst/impl/Btree.java 2008-12-29 21:32:32 UTC (rev 24828) @@ -469,7 +469,7 @@ case ClassDescriptor.tpByte: return new Byte(data[offs]); case ClassDescriptor.tpShort: - return new Short(Bytes.unpack2(data, offs)); + return Short.valueOf(Bytes.unpack2(data, offs)); case ClassDescriptor.tpChar: return new Character((char)Bytes.unpack2(data, offs)); case ClassDescriptor.tpInt: Modified: trunk/plugins/XMLSpider/org/garret/perst/impl/BtreeCompoundIndex.java =================================================================== --- trunk/plugins/XMLSpider/org/garret/perst/impl/BtreeCompoundIndex.java 2008-12-29 21:31:20 UTC (rev 24827) +++ trunk/plugins/XMLSpider/org/garret/perst/impl/BtreeCompoundIndex.java 2008-12-29 21:32:32 UTC (rev 24828) @@ -180,7 +180,7 @@ v = new Byte(data[offs++]); break; case ClassDescriptor.tpShort: - v = new Short(Bytes.unpack2(data, offs)); + v = Short.valueOf(Bytes.unpack2(data, offs)); offs += 2; break; case ClassDescriptor.tpChar: Modified: trunk/plugins/XMLSpider/org/garret/perst/impl/BtreeMultiFieldIndex.java =================================================================== --- trunk/plugins/XMLSpider/org/garret/perst/impl/BtreeMultiFieldIndex.java 2008-12-29 21:31:20 UTC (rev 24827) +++ trunk/plugins/XMLSpider/org/garret/perst/impl/BtreeMultiFieldIndex.java 2008-12-29 21:32:32 UTC (rev 24828) @@ -176,7 +176,7 @@ v = new Byte(data[offs++]); break; case ClassDescriptor.tpShort: - v = new Short(Bytes.unpack2(data, offs)); + v = Short.valueOf(Bytes.unpack2(data, offs)); offs += 2; break; case ClassDescriptor.tpChar: Modified: trunk/plugins/XMLSpider/org/garret/perst/impl/RndBtree.java =================================================================== --- trunk/plugins/XMLSpider/org/garret/perst/impl/RndBtree.java 2008-12-29 21:31:20 UTC (rev 24827) +++ trunk/plugins/XMLSpider/org/garret/perst/impl/RndBtree.java 2008-12-29 21:32:32 UTC (rev 24828) @@ -471,7 +471,7 @@ } Object getKeyValue(int i) { - return new Short(data[i]); + return Short.valueOf(data[i]); } BtreePage clonePage() { Modified: trunk/plugins/XMLSpider/org/garret/perst/impl/StorageImpl.java =================================================================== --- trunk/plugins/XMLSpider/org/garret/perst/impl/StorageImpl.java 2008-12-29 21:31:20 UTC (rev 24827) +++ trunk/plugins/XMLSpider/org/garret/perst/impl/StorageImpl.java 2008-12-29 21:32:32 UTC (rev 24828) @@ -3325,7 +3325,7 @@ offs += 2; break; case ClassDescriptor.tpShort: - val = new Short(Bytes.unpack2(body, offs)); + val = Short.valueOf(Bytes.unpack2(body, offs)); offs += 2; break; case ClassDescriptor.tpInt: @@ -3599,7 +3599,7 @@ offs += 2; break; case ClassDescriptor.tpShort: - val = new Short(Bytes.unpack2(body, offs)); + val = Short.valueOf(Bytes.unpack2(body, offs)); offs += 2; break; case ClassDescriptor.tpInt: _______________________________________________ cvs mailing list [email protected] http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs
