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

IndexedPropertyDescriptor not supported for List in Java 8

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 1.9.3
    • Fix Version/s: 1.9.3
    • Component/s: Bean / Property Utils
    • Labels:
      None
    • Environment:

      maven:3.3-jdk8

      Description

      With MAven 3.3 and JDK 8, Common Beanutils fails:

      https://builds.apache.org/view/Apache%20Commons/job/Commons%20Beanutils%20docker/4/console

      
      Failed tests: 
        IndexedPropertyTestCase.testArrayListIndexedPropertyDescriptor:175 Not IndexedPropertyDescriptor expected:<class java.beans.IndexedPropertyDescriptor> but was:<class java.beans.PropertyDescriptor>
        IndexedPropertyTestCase.testArrayListReadMethod:316 Threw exception java.lang.ClassCastException: java.beans.PropertyDescriptor cannot be cast to java.beans.IndexedPropertyDescriptor
        IndexedPropertyTestCase.testArrayListWriteMethod:330 Threw exception java.lang.ClassCastException: java.beans.PropertyDescriptor cannot be cast to java.beans.IndexedPropertyDescriptor
        IndexedPropertyTestCase.testListIndexedPropertyDescriptor:156 Not IndexedPropertyDescriptor expected:<class java.beans.IndexedPropertyDescriptor> but was:<class java.beans.PropertyDescriptor>
        IndexedPropertyTestCase.testListIndexedReadMethod:288 Threw exception java.lang.ClassCastException: java.beans.PropertyDescriptor cannot be cast to java.beans.IndexedPropertyDescriptor
        IndexedPropertyTestCase.testListIndexedWriteMethod:302 Threw exception java.lang.ClassCastException: java.beans.PropertyDescriptor cannot be cast to java.beans.IndexedPropertyDescriptor
        IndexedPropertyTestCase.testListReadMethod:256 Threw exception java.lang.ClassCastException: java.beans.PropertyDescriptor cannot be cast to java.beans.IndexedPropertyDescriptor
        IndexedPropertyTestCase.testListWriteMethod:274 Threw exception java.lang.ClassCastException: java.beans.PropertyDescriptor cannot be cast to java.beans.IndexedPropertyDescriptor
        Jira422TestCase.testRootBean:36 expected:<java.[lang.String]> but was:<java.[util.List]>
        Jira422TestCase.testSecondChildBean:42 expected:<java.[lang.String]> but was:<java.[util.List]>
      

      It seems some assumptions about java.beans.PropertyDescriptor implementation are no longer true in JDK 8.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                stain Stian Soiland-Reyes
                Reporter:
                stain Stian Soiland-Reyes
              • Votes:
                4 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: