You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Niall Pemberton (JIRA)" <ji...@apache.org> on 2008/08/20 04:14:46 UTC
[jira] Resolved: (BEANUTILS-316) getAccessibleMethod returns null
when method is declared in a package-private class but used through a
bublic subclass
[ https://issues.apache.org/jira/browse/BEANUTILS-316?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Niall Pemberton resolved BEANUTILS-316.
---------------------------------------
Resolution: Duplicate
I have fixed this under BEANUTILS-265 - so closing this as duplicate. Good job you posted thsi though, because BEANUTILS-265 got assigned to after 1.8.0, so it had dropped off my radar. Thanks for your input.
> 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.