poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 47962] Fix string literal bugs and inefficient object creation
Date Thu, 08 Oct 2009 23:05:34 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=47962

Josh Micich <josh@gildedtree.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #2 from Josh Micich <josh@gildedtree.com> 2009-10-08 16:05:31 PDT ---
Thanks for the patch - some good clean up work.

Applied in svn r823348 with mods

Not all occurrences of 'foo.equals("bar")' were changed to '"bar".equals(foo)'.
 Presumably this change is intended to reduce the likelihood of a
NullPointerException.  In many cases however, it was clear that 'foo' could not
be null, and the code was left as-is for readability.

Regarding the box constructor vs valueOf() method changes - I'm pretty sure
there were no places where POI needs distinct instances, so most of these were
OK.  However, a few changes were not applied for these reasons:
  - caching of box instances generally applies to small integral values near
zero.
  - Double.valueOf(double) does not utilize a DoubleCache or similar.
  - Boolean.FALSE is better than Boolean.valueOf(false).


If you are keen to fix other compiler warnings that would be very much
appreciated.  Please try to keep the patches smaller, to make them easier to
QA.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


Mime
View raw message