Uploaded image for project: 'Felix'
  1. Felix
  2. FELIX-6157

Converter build fails with Java 12

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: converter-1.0.8
    • Fix Version/s: converter-1.0.10
    • Component/s: Converter
    • Labels:
      None

      Description

      When I build the converter project with Java 12 I get a lot of failures, see below.
      These problems don't exist with Java 11. This needs to be investigated and fixed.

       

      [INFO] -------------------------------------------------------
      [INFO]  T E S T S
      [INFO] -------------------------------------------------------
      [INFO] Running org.osgi.util.converter.UtilTest
      [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.028 s - in org.osgi.util.converter.UtilTest
      [INFO] Running org.osgi.util.converter.ConverterBuilderTest
      [ERROR] Tests run: 9, Failures: 1, Errors: 0, Skipped: 3, Time elapsed: 0.046 s <<< FAILURE! - in org.osgi.util.converter.ConverterBuilderTest
      [ERROR] testWildcardAdapter1(org.osgi.util.converter.ConverterBuilderTest)  Time elapsed: 0.041 s  <<< FAILURE!
      org.junit.ComparisonFailure: expected:<[1]> but was:<[describeConstable]>
      	at org.osgi.util.converter.ConverterBuilderTest.testWildcardAdapter1(ConverterBuilderTest.java:192)
      
      [INFO] Running org.osgi.util.converter.ConverterTest
      [ERROR] Tests run: 77, Failures: 6, Errors: 13, Skipped: 0, Time elapsed: 0.104 s <<< FAILURE! - in org.osgi.util.converter.ConverterTest
      [ERROR] testCustomErrorHandling(org.osgi.util.converter.ConverterTest)  Time elapsed: 0.001 s  <<< ERROR!
      org.osgi.util.converter.ConversionException: Cannot convert 12 to class java.lang.Integer
      	at org.osgi.util.converter.ConverterTest.testCustomErrorHandling(ConverterTest.java:495)
      
      [ERROR] testFromArrayToGenericOrderPreservingSet(org.osgi.util.converter.ConverterTest)  Time elapsed: 0.001 s  <<< ERROR!
      java.lang.ClassCastException: class java.lang.String cannot be cast to class java.lang.Long (java.lang.String and java.lang.Long are in module java.base of loader 'bootstrap')
      	at org.osgi.util.converter.ConverterTest.testFromArrayToGenericOrderPreservingSet(ConverterTest.java:313)
      
      [ERROR] testDTOFieldShadowing(org.osgi.util.converter.ConverterTest)  Time elapsed: 0.006 s  <<< FAILURE!
      java.lang.AssertionError: expected:<{ping=test, count=THREE, pong=0, embedded=null}> but was:<{count=describeConstable, pong=describeConstable, embedded=null, ping=test}>
      	at org.osgi.util.converter.ConverterTest.testDTOFieldShadowing(ConverterTest.java:874)
      
      [ERROR] testEnums(org.osgi.util.converter.ConverterTest)  Time elapsed: 0.001 s  <<< ERROR!
      org.osgi.util.converter.ConversionException: Cannot convert [] to class org.osgi.util.converter.ConverterTest$TestEnum
      	at org.osgi.util.converter.ConverterTest.testEnums(ConverterTest.java:212)
      
      [ERROR] testFromUnknownDataTypeViaString(org.osgi.util.converter.ConverterTest)  Time elapsed: 0 s  <<< ERROR!
      org.osgi.util.converter.ConversionException: Cannot convert 1234 to class java.lang.Integer
      	at org.osgi.util.converter.ConverterTest.testFromUnknownDataTypeViaString(ConverterTest.java:246)
      
      [ERROR] testCharArrayConversion(org.osgi.util.converter.ConverterTest)  Time elapsed: 0.001 s  <<< FAILURE!
      org.junit.internal.ArrayComparisonFailure: arrays first differed at element [0]; expected:<> but was:<d>
      	at org.osgi.util.converter.ConverterTest.testCharArrayConversion(ConverterTest.java:342)
      Caused by: java.lang.AssertionError: expected:<> but was:<d>
      	at org.osgi.util.converter.ConverterTest.testCharArrayConversion(ConverterTest.java:342)
      
      [ERROR] testPrefixDTO(org.osgi.util.converter.ConverterTest)  Time elapsed: 0.001 s  <<< ERROR!
      org.osgi.util.converter.ConversionException: Cannot create DTO class org.osgi.util.converter.PrefixDTO
      	at org.osgi.util.converter.ConverterTest.testPrefixDTO(ConverterTest.java:1288)
      Caused by: org.osgi.util.converter.ConversionException: Cannot convert 327 to class java.lang.Long
      	at org.osgi.util.converter.ConverterTest.testPrefixDTO(ConverterTest.java:1288)
      
      [ERROR] testFromGenericSetToLinkedList(org.osgi.util.converter.ConverterTest)  Time elapsed: 0.001 s  <<< FAILURE!
      java.lang.AssertionError: expected:<[123, 456]> but was:<[describeConstable, describeConstable]>
      	at org.osgi.util.converter.ConverterTest.testFromGenericSetToLinkedList(ConverterTest.java:302)
      
      [ERROR] testDefaultValue(org.osgi.util.converter.ConverterTest)  Time elapsed: 0 s  <<< ERROR!
      org.osgi.util.converter.ConversionException: Cannot convert 12 to class java.lang.Long
      	at org.osgi.util.converter.ConverterTest.testDefaultValue(ConverterTest.java:723)
      
      [ERROR] testDTONameMangling(org.osgi.util.converter.ConverterTest)  Time elapsed: 0.001 s  <<< ERROR!
      org.osgi.util.converter.ConversionException: Cannot create DTO class org.osgi.util.converter.MyDTO7
      	at org.osgi.util.converter.ConverterTest.testDTONameMangling(ConverterTest.java:1101)
      Caused by: org.osgi.util.converter.ConversionException: Cannot convert 456 to class java.lang.Long
      	at org.osgi.util.converter.ConverterTest.testDTONameMangling(ConverterTest.java:1101)
      
      [ERROR] testSimpleConversions(org.osgi.util.converter.ConverterTest)  Time elapsed: 0.001 s  <<< FAILURE!
      org.junit.ComparisonFailure: expected:<[123]> but was:<[describeConstable]>
      	at org.osgi.util.converter.ConverterTest.testSimpleConversions(ConverterTest.java:115)
      
      [ERROR] testAnnotationInterface(org.osgi.util.converter.ConverterTest)  Time elapsed: 0.001 s  <<< ERROR!
      org.osgi.util.converter.ConversionException: Cannot convert 327 to class java.lang.Long
      	at org.osgi.util.converter.ConverterTest.testAnnotationInterface(ConverterTest.java:1342)
      
      [ERROR] testMapToDTOWithGenerics(org.osgi.util.converter.ConverterTest)  Time elapsed: 0.001 s  <<< FAILURE!
      java.lang.AssertionError: expected: java.util.Arrays$ArrayList<[999, 1000]> but was: java.util.ArrayList<[999, 1000]>
      	at org.osgi.util.converter.ConverterTest.testMapToDTOWithGenerics(ConverterTest.java:985)
      
      [ERROR] testStringArrayToIntegerArray(org.osgi.util.converter.ConverterTest)  Time elapsed: 0 s  <<< ERROR!
      java.lang.NullPointerException
      	at org.osgi.util.converter.ConverterTest.testStringArrayToIntegerArray(ConverterTest.java:333)
      
      [ERROR] testPrefixInterface(org.osgi.util.converter.ConverterTest)  Time elapsed: 0.001 s  <<< ERROR!
      org.osgi.util.converter.ConversionException: Cannot convert 327 to class java.lang.Long
      	at org.osgi.util.converter.ConverterTest.testPrefixInterface(ConverterTest.java:1307)
      
      [ERROR] testLongCollectionConversion(org.osgi.util.converter.ConverterTest)  Time elapsed: 0.001 s  <<< FAILURE!
      java.lang.AssertionError: actual array was null
      	at org.osgi.util.converter.ConverterTest.testLongCollectionConversion(ConverterTest.java:402)
      
      [ERROR] testExceptionDefaultValue(org.osgi.util.converter.ConverterTest)  Time elapsed: 0.001 s  <<< ERROR!
      org.osgi.util.converter.ConversionException: Cannot convert haha to class java.lang.Integer
      	at org.osgi.util.converter.ConverterTest.testExceptionDefaultValue(ConverterTest.java:414)
      
      [ERROR] testFromMultiToSingle(org.osgi.util.converter.ConverterTest)  Time elapsed: 0 s  <<< ERROR!
      org.osgi.util.converter.ConversionException: Cannot convert [42, 17] to class java.lang.Integer
      	at org.osgi.util.converter.ConverterTest.testFromMultiToSingle(ConverterTest.java:275)
      
      [ERROR] testLiveMapFromBean(org.osgi.util.converter.ConverterTest)  Time elapsed: 0.001 s  <<< ERROR!
      org.osgi.util.converter.ConversionException: Cannot convert 9223372036854775807 to class java.lang.Long
      	at org.osgi.util.converter.ConverterTest.testLiveMapFromBean(ConverterTest.java:1271)
      
      [INFO] Running org.osgi.util.converter.ConverterFunctionTest
      [ERROR] Tests run: 3, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 0.001 s <<< FAILURE! - in org.osgi.util.converter.ConverterFunctionTest
      [ERROR] testConverterFunctionWithModifier(org.osgi.util.converter.ConverterFunctionTest)  Time elapsed: 0 s  <<< ERROR!
      org.osgi.util.converter.ConversionException: Cannot convert  to class java.lang.Integer
      	at org.osgi.util.converter.ConverterFunctionTest.testConverterFunctionWithModifier(ConverterFunctionTest.java:42)
      
      [ERROR] testConverterFunction(org.osgi.util.converter.ConverterFunctionTest)  Time elapsed: 0 s  <<< ERROR!
      org.osgi.util.converter.ConversionException: Cannot convert 12.5 to class java.lang.Double
      	at org.osgi.util.converter.ConverterFunctionTest.testConverterFunction(ConverterFunctionTest.java:28)
      
      [INFO] Running org.osgi.util.converter.ConverterMapTest
      [ERROR] Tests run: 43, Failures: 3, Errors: 13, Skipped: 1, Time elapsed: 0.016 s <<< FAILURE! - in org.osgi.util.converter.ConverterMapTest
      [ERROR] testGenericMapConversion(org.osgi.util.converter.ConverterMapTest)  Time elapsed: 0 s  <<< ERROR!
      org.osgi.util.converter.ConversionException: Cannot convert 987654321 to class java.lang.Long
      	at org.osgi.util.converter.ConverterMapTest.testGenericMapConversion(ConverterMapTest.java:66)
      
      [ERROR] testCaseSensitiveDTO(org.osgi.util.converter.ConverterMapTest)  Time elapsed: 0 s  <<< ERROR!
      org.osgi.util.converter.ConversionException: Cannot create DTO class org.osgi.util.converter.MyDTO
      	at org.osgi.util.converter.ConverterMapTest.testCaseSensitiveDTO(ConverterMapTest.java:406)
      Caused by: org.osgi.util.converter.ConversionException: Cannot convert 999 to class java.lang.Long
      	at org.osgi.util.converter.ConverterMapTest.testCaseSensitiveDTO(ConverterMapTest.java:406)
      
      [ERROR] testMapWithKeywords(org.osgi.util.converter.ConverterMapTest)  Time elapsed: 0 s  <<< ERROR!
      org.osgi.util.converter.ConversionException: Cannot create DTO class org.osgi.util.converter.ConverterMapTest$MyDTOWithKeyWords
      	at org.osgi.util.converter.ConverterMapTest.testMapWithKeywords(ConverterMapTest.java:651)
      Caused by: org.osgi.util.converter.ConversionException: Cannot convert 123 to class java.lang.Long
      	at org.osgi.util.converter.ConverterMapTest.testMapWithKeywords(ConverterMapTest.java:651)
      
      [ERROR] testCaseInsensitiveDTO(org.osgi.util.converter.ConverterMapTest)  Time elapsed: 0 s  <<< ERROR!
      org.osgi.util.converter.ConversionException: Cannot create DTO class org.osgi.util.converter.MyDTO
      	at org.osgi.util.converter.ConverterMapTest.testCaseInsensitiveDTO(ConverterMapTest.java:393)
      Caused by: org.osgi.util.converter.ConversionException: Cannot convert 999 to class java.lang.Long
      	at org.osgi.util.converter.ConverterMapTest.testCaseInsensitiveDTO(ConverterMapTest.java:393)
      
      [ERROR] testMapEntry2(org.osgi.util.converter.ConverterMapTest)  Time elapsed: 0 s  <<< ERROR!
      org.osgi.util.converter.ConversionException: Cannot convert 123=567 to class java.lang.Integer
      	at org.osgi.util.converter.ConverterMapTest.testMapEntry2(ConverterMapTest.java:488)
      
      [ERROR] testMapEntry3(org.osgi.util.converter.ConverterMapTest)  Time elapsed: 0 s  <<< ERROR!
      org.osgi.util.converter.ConversionException: Cannot convert 9=10 to class java.lang.Long
      	at org.osgi.util.converter.ConverterMapTest.testMapEntry3(ConverterMapTest.java:497)
      
      [ERROR] testMapEntry5(org.osgi.util.converter.ConverterMapTest)  Time elapsed: 0 s  <<< ERROR!
      org.osgi.util.converter.ConversionException: Cannot convert null=5 to class java.lang.Integer
      	at org.osgi.util.converter.ConverterMapTest.testMapEntry5(ConverterMapTest.java:514)
      
      [ERROR] testMapEntry9(org.osgi.util.converter.ConverterMapTest)  Time elapsed: 0 s  <<< ERROR!
      org.osgi.util.converter.ConversionException: Cannot convert null=5 to class java.lang.Integer
      	at org.osgi.util.converter.ConverterMapTest.testMapEntry9(ConverterMapTest.java:550)
      
      [ERROR] testMapToInterface1(org.osgi.util.converter.ConverterMapTest)  Time elapsed: 0.001 s  <<< FAILURE!
      org.junit.ComparisonFailure: expected:<[12345]> but was:<[describeConstable]>
      	at org.osgi.util.converter.ConverterMapTest.testMapToInterface1(ConverterMapTest.java:227)
      
      [ERROR] testMapToInterface2(org.osgi.util.converter.ConverterMapTest)  Time elapsed: 0 s  <<< ERROR!
      org.osgi.util.converter.ConversionException: Cannot convert 999 to class java.lang.Integer
      	at org.osgi.util.converter.ConverterMapTest.testMapToInterface2(ConverterMapTest.java:244)
      
      [ERROR] testCaseSensitiveKeysAnnotation(org.osgi.util.converter.ConverterMapTest)  Time elapsed: 0.001 s  <<< ERROR!
      org.osgi.util.converter.ConversionException: Cannot convert 42 to class java.lang.Integer
      	at org.osgi.util.converter.ConverterMapTest.testCaseSensitiveKeysAnnotation(ConverterMapTest.java:382)
      
      [ERROR] testMapToJavaBean(org.osgi.util.converter.ConverterMapTest)  Time elapsed: 0.001 s  <<< FAILURE!
      java.lang.AssertionError: actual array was null
      	at org.osgi.util.converter.ConverterMapTest.testMapToJavaBean(ConverterMapTest.java:138)
      
      [ERROR] testMapToAnnotation1(org.osgi.util.converter.ConverterMapTest)  Time elapsed: 0.001 s  <<< FAILURE!
      org.junit.ComparisonFailure: expected:<[12345]> but was:<[describeConstable]>
      	at org.osgi.util.converter.ConverterMapTest.testMapToAnnotation1(ConverterMapTest.java:263)
      
      [ERROR] testMapEntry10(org.osgi.util.converter.ConverterMapTest)  Time elapsed: 0.001 s  <<< ERROR!
      org.osgi.util.converter.ConversionException: Cannot convert 4=null to class java.lang.Integer
      	at org.osgi.util.converter.ConverterMapTest.testMapEntry10(ConverterMapTest.java:559)
      
      [ERROR] testMapEntry11(org.osgi.util.converter.ConverterMapTest)  Time elapsed: 0 s  <<< ERROR!
      org.osgi.util.converter.ConversionException: Cannot convert null=5 to class java.lang.Long
      	at org.osgi.util.converter.ConverterMapTest.testMapEntry11(ConverterMapTest.java:568)
      
      [ERROR] testMapEntry12(org.osgi.util.converter.ConverterMapTest)  Time elapsed: 0 s  <<< ERROR!
      org.osgi.util.converter.ConversionException: Cannot convert null=null to class java.lang.Integer
      	at org.osgi.util.converter.ConverterMapTest.testMapEntry12(ConverterMapTest.java:577)
      
      [INFO] Running org.osgi.util.converter.ConverterCollectionsTest
      [INFO] Tests run: 26, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.013 s - in org.osgi.util.converter.ConverterCollectionsTest
      [INFO]
      [INFO] Results:
      [INFO]
      [ERROR] Failures:
      [ERROR]   ConverterBuilderTest.testWildcardAdapter1:192 expected:<[1]> but was:<[describeConstable]>
      [ERROR]   ConverterMapTest.testMapToAnnotation1:263 expected:<[12345]> but was:<[describeConstable]>
      [ERROR]   ConverterMapTest.testMapToInterface1:227 expected:<[12345]> but was:<[describeConstable]>
      [ERROR]   ConverterMapTest.testMapToJavaBean:138 actual array was null
      [ERROR]   ConverterTest.testCharArrayConversion:342 arrays first differed at element [0]; expected:<> but was:<d>
      [ERROR]   ConverterTest.testDTOFieldShadowing:874 expected:<{ping=test, count=THREE, pong=0, embedded=null}> but was:<{count=describeConstable, pong=describeConstable, embedded=null, ping=test}>
      [ERROR]   ConverterTest.testFromGenericSetToLinkedList:302 expected:<[123, 456]> but was:<[describeConstable, describeConstable]>
      [ERROR]   ConverterTest.testLongCollectionConversion:402 actual array was null
      [ERROR]   ConverterTest.testMapToDTOWithGenerics:985 expected: java.util.Arrays$ArrayList<[999, 1000]> but was: java.util.ArrayList<[999, 1000]>
      [ERROR]   ConverterTest.testSimpleConversions:115 expected:<[123]> but was:<[describeConstable]>
      [ERROR] Errors:
      [ERROR]   ConverterFunctionTest.testConverterFunction:28 » Conversion Cannot convert 12....
      [ERROR]   ConverterFunctionTest.testConverterFunctionWithModifier:42 » Conversion Cannot...
      [ERROR]   ConverterMapTest.testCaseInsensitiveDTO:393 » Conversion Cannot create DTO cla...
      [ERROR]   ConverterMapTest.testCaseSensitiveDTO:406 » Conversion Cannot create DTO class...
      [ERROR]   ConverterMapTest.testCaseSensitiveKeysAnnotation:382 » Conversion Cannot conve...
      [ERROR]   ConverterMapTest.testGenericMapConversion:66 » Conversion Cannot convert 98765...
      [ERROR]   ConverterMapTest.testMapEntry10:559 » Conversion Cannot convert 4=null to clas...
      [ERROR]   ConverterMapTest.testMapEntry11:568 » Conversion Cannot convert null=5 to clas...
      [ERROR]   ConverterMapTest.testMapEntry12:577 » Conversion Cannot convert null=null to c...
      [ERROR]   ConverterMapTest.testMapEntry2:488 » Conversion Cannot convert 123=567 to clas...
      [ERROR]   ConverterMapTest.testMapEntry3:497 » Conversion Cannot convert 9=10 to class j...
      [ERROR]   ConverterMapTest.testMapEntry5:514 » Conversion Cannot convert null=5 to class...
      [ERROR]   ConverterMapTest.testMapEntry9:550 » Conversion Cannot convert null=5 to class...
      [ERROR]   ConverterMapTest.testMapToInterface2:244 » Conversion Cannot convert 999 to cl...
      [ERROR]   ConverterMapTest.testMapWithKeywords:651 » Conversion Cannot create DTO class ...
      [ERROR]   ConverterTest.testAnnotationInterface:1342 » Conversion Cannot convert 327 to ...
      [ERROR]   ConverterTest.testCustomErrorHandling:495 » Conversion Cannot convert 12 to cl...
      [ERROR]   ConverterTest.testDTONameMangling:1101 » Conversion Cannot create DTO class or...
      [ERROR]   ConverterTest.testDefaultValue:723 » Conversion Cannot convert 12 to class jav...
      [ERROR]   ConverterTest.testEnums:212 » Conversion Cannot convert [] to class org.osgi.u...
      [ERROR]   ConverterTest.testExceptionDefaultValue:414 » Conversion Cannot convert haha t...
      [ERROR]   ConverterTest.testFromArrayToGenericOrderPreservingSet:313 ClassCast class jav...
      [ERROR]   ConverterTest.testFromMultiToSingle:275 » Conversion Cannot convert [42, 17] t...
      [ERROR]   ConverterTest.testFromUnknownDataTypeViaString:246 » Conversion Cannot convert...
      [ERROR]   ConverterTest.testLiveMapFromBean:1271 » Conversion Cannot convert 92233720368...
      [ERROR]   ConverterTest.testPrefixDTO:1288 » Conversion Cannot create DTO class org.osgi...
      [ERROR]   ConverterTest.testPrefixInterface:1307 » Conversion Cannot convert 327 to clas...
      [ERROR]   ConverterTest.testStringArrayToIntegerArray:333 NullPointer
      [INFO]
      [ERROR] Tests run: 159, Failures: 10, Errors: 28, Skipped: 4
      

       

        Attachments

          Activity

            People

            • Assignee:
              bosschaert David Bosschaert
              Reporter:
              bosschaert David Bosschaert
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: