You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2020/08/14 16:18:00 UTC

[jira] [Work logged] (LANG-1596) ArrayUtils.toPrimitive(Object) does not support boolean and other types

     [ https://issues.apache.org/jira/browse/LANG-1596?focusedWorklogId=470741&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-470741 ]

ASF GitHub Bot logged work on LANG-1596:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 14/Aug/20 16:17
            Start Date: 14/Aug/20 16:17
    Worklog Time Spent: 10m 
      Work Description: reckart opened a new pull request #607:
URL: https://github.com/apache/commons-lang/pull/607


   - Add support for the missing types to toPrimitive(Object)
   - Added tests for toPrimitive methods which did not have test coverage yet
   - Added explicit test for the toPrimitive(Object) method for all primitive types


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Issue Time Tracking
-------------------

            Worklog Id:     (was: 470741)
    Remaining Estimate: 0h
            Time Spent: 10m

> ArrayUtils.toPrimitive(Object) does not support boolean and other types
> -----------------------------------------------------------------------
>
>                 Key: LANG-1596
>                 URL: https://issues.apache.org/jira/browse/LANG-1596
>             Project: Commons Lang
>          Issue Type: Bug
>          Components: lang.*
>    Affects Versions: 3.11
>            Reporter: Richard Eckart de Castilho
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> ArrayUtils.toPrimitive(Object) supports only Integer, Long, Short, Double and Float. Boolean, Byte, and Character are not supported.
> This causes e.g. also calls to MethodUtils.invokeStaticMethod(...) to fail if e.g. a Boolean array is provided as the argument for a primitive boolean vararg because getVarArgs does expect ArrayUtils to do the right thing:
> {code}
>         if (varArgComponentType.isPrimitive()) {
>             // unbox from wrapper type to primitive type
>             varArgsArray = ArrayUtils.toPrimitive(varArgsArray);
>         }
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)