Uploaded image for project: 'Commons BeanUtils'
  1. Commons BeanUtils
  2. BEANUTILS-273

Public methods overriden in anonymous or private subclasses are not recognized by PropertyUtils

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.7.0
    • 1.8.0
    • Bean / Property Utils
    • None

    Description

      When you do something like:

      TestBean anonymous = new TestBean() {
      public String getStringProperty()

      { return "foo"; }

      };
      PropertyUtils.getProperty(anonymous, "stringProperty");

      PropertyUtils fails as:

      java.lang.NoSuchMethodException: Property 'stringProperty' has no getter method in class 'class org.apache.commons.beanutils.PropertyUtilsTestCase$1'

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            niallp Niall Pemberton
            mliberato@gmail.com Marcelo Liberato
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment