[
https://issues.apache.org/jira/browse/BEANUTILS-316?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12599309#action_12599309
]
tidus3012 edited comment on BEANUTILS-316 at 5/23/08 2:25 AM:
------------------------------------------------------------------
Marking as duplicating BEANUTILS-265.
Just ran through this BEANUTILS-265 while looking for something else ... My bad.
was (Author: tidus3012):
Just ran through this one while looking for something else ... My bad.
> getAccessibleMethod returns null when method is declared in a package-private
> class but used through a bublic subclass
> ----------------------------------------------------------------------------------------------------------------------
>
> Key: BEANUTILS-316
> URL: https://issues.apache.org/jira/browse/BEANUTILS-316
> Project: Commons BeanUtils
> Issue Type: Bug
> Components: Bean / Property Utils
> Affects Versions: 1.7.0
> Environment: Probably not relevant here, but I use IBM Websphere
> Application Server 5.0
> Reporter: Romain Muller
> Priority: Minor
> Attachments: TestCase.zip
>
> Original Estimate: 1h
> Remaining Estimate: 1h
>
> Given two classes : A, which is package-private, and B which extends A and is
> public. You might then access all methods declared in A from any instance of
> B anywhere, even outside of the package containing A.
> But PropertyUtils.setProperty fails if the property accessed is not
> overloaded in B.
> Fact is in my use case it appears unrelevant for users of B to knoy about A,
> and it is definitely undesireable to use references declared as A from
> anywhere outside the package.
> PropertyUtils shoud in my opinion check wether the effective class of the
> bean is public and that the accessor method is also public instead of looking
> for a public method declared in a public class or interface.
> This might not conform to JavaBean specifications, though, but this change
> would not cost a lot, and would definitely get things a little more flexible.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.