[ 
https://issues.apache.org/jira/browse/HADOOP-14188?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15939858#comment-15939858
 ] 

Tsuyoshi Ozawa commented on HADOOP-14188:
-----------------------------------------

{quote}
Getter/setter method can be used instead of this hack.
{quote}

Personally, I don't prefer to add setter/getter to actual code, (I mean not 
test code),  to upgrade a test tool since this solution breaks encapsulation. 
Instead of that, how about porting Whitebox class over to Hadoop common as a 
utility tool? The choice is worth thinking, since your patch just proved that 
the Whitebox class is useful and widely used. Fortunately, mockito is 
distributed under MIT license.

> Remove the usage of org.mockito.internal.util.reflection.Whitebox
> -----------------------------------------------------------------
>
>                 Key: HADOOP-14188
>                 URL: https://issues.apache.org/jira/browse/HADOOP-14188
>             Project: Hadoop Common
>          Issue Type: Test
>          Components: test
>            Reporter: Akira Ajisaka
>            Assignee: Akira Ajisaka
>            Priority: Minor
>         Attachments: HADOOP-14188.01.patch, HADOOP-14188.02.patch
>
>
> org.mockito.internal.util.reflection.Whitebox was removed in Mockito 2.1, so 
> we need to remove the usage to upgrade Mockito. Getter/setter method can be 
> used instead of this hack.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to