You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by bu...@apache.org on 2005/10/04 20:25:12 UTC

DO NOT REPLY [Bug 36915] New: - change to ArrayUtils.toPrimitive and toObject

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=36915>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=36915

           Summary: change to ArrayUtils.toPrimitive and toObject
           Product: Commons
           Version: unspecified
          Platform: Other
               URL: http://www.jroller.com/page/erickreid?entry=as_opposed_t
                    o_commons_lang
        OS/Version: other
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Lang
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: erickreid@hotmail.com


before seeing that commons-lang already had the functionality provided by
ArrayUtils.toPrimitive and toObject, i wrote a utility with the same idea in
mind
(http://jroller.com/page/erickreid?entry=getboxedarray_and_getunboxedarray_java_5).

i like that use of ArrayUtils methods forgives the developer from having to
cast, but dislike the fact that the ArrayUtils toPrimitive methods can throw an
NPE at any point in the conversion.  would the commons-lang team consider using
my code as part of an alteration to the ArrayUtils methods?

perhaps:

public int[] toPrimitive(Integer integers[]) {
  return (int[]) _getUnboxedArray(integers);
}

very best regards and thanks for providing a great toolset!
--erick

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

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