Menu

#2445 Unit test fails on Java 7

Test
closed-fixed
5
2012-09-14
2012-05-14
No

Java 5: The characters in the string must all be decimal digits, except that the first character may be an ASCII minus sign '-' ('\u002D') to indicate a negative value

Java 7: The characters in the string must all be decimal digits, except that the first character may be an ASCII minus sign '-' ('\u002D') to indicate a negative value or an ASCII plus sign '+' ('\u002B') to indicate a positive value.

*****

This will affect code that was expecting an IllegalArgumentException for +x but now gets x, such as CIMDataTimeAbsolute constructor, which is how this change was identified as its unit test failed on Java 7 for "200703141605+3.566012+010"

Discussion

  • Dave Blaschke

    Dave Blaschke - 2012-05-14

    One unit test case fails when compiled/executed on Java 7:

    [java] Test case failed: CIMDateTimeAbsoluteTest.testStringConstructorNegative(CIMDateTimeAbsoluteTest.java:331) "IllegalArgumentException was not thrown for invalid field in 200703141605+3.566012+010 !"

     
  • Dave Blaschke

    Dave Blaschke - 2012-05-14
    • summary: Java 7 Integer.parseInt functionality change --> Unit test fails on Java 7
     
  • Dave Blaschke

    Dave Blaschke - 2012-05-14
    • status: open --> open-fixed
     
  • Dave Blaschke

    Dave Blaschke - 2012-05-14

    Patch sent for community review. During a 2 week period any
    exploiter may comment on the patch, request changes or turn it
    down completely (with good reason). For the time being the patch is part of the "Experimental" branch in CVS.

     
  • Dave Blaschke

    Dave Blaschke - 2012-05-31

    Patch against HEAD

     
  • Dave Blaschke

    Dave Blaschke - 2012-05-31

    The community review has completed and we received no substantial criticism. Therefore the patch has been approved and merged into the "HEAD" branch. The next release will pick it up.

     
  • Dave Blaschke

    Dave Blaschke - 2012-05-31
    • status: open-fixed --> pending-fixed
     
  • Dave Blaschke

    Dave Blaschke - 2012-09-14

    The patch was picked up by release 2.2.0 and will therefore be closed.

     
  • Dave Blaschke

    Dave Blaschke - 2012-09-14
    • status: pending-fixed --> closed-fixed
     

Log in to post a comment.