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

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

                Author: ASF GitHub Bot
            Created on: 08/Oct/22 12:57
            Start Date: 08/Oct/22 12:57
    Worklog Time Spent: 10m 
      Work Description: tisonkun opened a new pull request, #951:
URL: https://github.com/apache/commons-lang/pull/951

   This patch should be easy to understand.
   
   Generally, it won't affect user cases as long as the type can be inferred by 
the recipient or JDK rules. There's a case as shown in 
`ReflectionDiffBuilder.java` that if the type inference results in ambiguity, 
it may cause compile error.
   
   Thus, I'm unsure whether this is proper to be included with a minor version 
bump. I don't think adding another series of methods helps - it causes further 
confusion.
   
   This patch doesn't cause extra class cast exception because if the recipient 
is `Object` the cast should always succeed. And if the recipient already cast 
it into another type, there will be an exception if the cast cannot be 
performed.




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

    Worklog Id:     (was: 814960)
    Time Spent: 4h 10m  (was: 4h)

> Cast FieldUtils.readField result to the recipient type
> ------------------------------------------------------
>
>                 Key: LANG-1692
>                 URL: https://issues.apache.org/jira/browse/LANG-1692
>             Project: Commons Lang
>          Issue Type: Task
>          Components: lang.reflect.*
>            Reporter: Zili Chen
>            Priority: Major
>          Time Spent: 4h 10m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to