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

    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

            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: