You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Romain Muller (JIRA)" <ji...@apache.org> on 2008/05/23 11:03:55 UTC

[jira] Created: (BEANUTILS-316) getAccessibleMethod returns null when method is declared in a package-private class but used through a bublic subclass

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


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.


[jira] Updated: (BEANUTILS-316) getAccessibleMethod returns null when method is declared in a package-private class but used through a bublic subclass

Posted by "Romain Muller (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/BEANUTILS-316?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Romain Muller updated BEANUTILS-316:
------------------------------------

    Attachment: TestCase.zip

Testcase for this issue. 
Also denotes the inconsistency filed in bug BEANUTILS-18.

> 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.


[jira] Resolved: (BEANUTILS-316) getAccessibleMethod returns null when method is declared in a package-private class but used through a bublic subclass

Posted by "Niall Pemberton (JIRA)" <ji...@apache.org>.
     [ 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.


[jira] Issue Comment Edited: (BEANUTILS-316) getAccessibleMethod returns null when method is declared in a package-private class but used through a bublic subclass

Posted by "Romain Muller (JIRA)" <ji...@apache.org>.
    [ 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.


[jira] Issue Comment Edited: (BEANUTILS-316) getAccessibleMethod returns null when method is declared in a package-private class but used through a bublic subclass

Posted by "Romain Muller (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BEANUTILS-316?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12599310#action_12599310 ] 

tidus3012 edited comment on BEANUTILS-316 at 5/23/08 2:25 AM:
------------------------------------------------------------------

Joined a testcase for this issue. 
Also denotes the inconsistency filed in bug BEANUTILS-18.

      was (Author: tidus3012):
    Testcase for this issue. 
Also denotes the inconsistency filed in bug BEANUTILS-18.
  
> 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.