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

Thomas Neidhart commented on BEANUTILS-451:
-------------------------------------------

By default, one can not access a private inner class from another class, in 
this case PropertyUtils, as it is not accessible.

You can test with by calling: PropertyUtils.isReadable(bean, "field"), which 
will return false in your case.

> PropertyUtils doesn´t work with private internal classes
> --------------------------------------------------------
>
>                 Key: BEANUTILS-451
>                 URL: https://issues.apache.org/jira/browse/BEANUTILS-451
>             Project: Commons BeanUtils
>          Issue Type: Bug
>          Components: Bean / Property Utils
>    Affects Versions: 1.8.3
>            Reporter: Robson Vargas Farias
>            Priority: Critical
>
> I did a test using a internal private class to get the value of the fields. 
> Sample:
> public class Master {
> private class Internal {
> private String field;
> public String getField() { return field; }
> public void setField(String field) {
> this.field = field;
> }
> }
> }
> When I try: PropertyUtils.getProperty(myInternalInstance, "field") I got an 
> exception about "field not found".



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to