Releasing Java 9 compatible version
This is the first Java 9 compatible version
DO NOT use any previous release with Java 9 as it will blow up.
-
string.getChars
used to throw ArrayIndexOutOfBoundsException (tested on JDK 6-8) but now it throwsStringIndexOutOfBoundsException
. This version was updated to catchIndexOutOfBoundsException
instead so it can work with all JDKs (tested from 6 to 9). -
SimpleDateFormat
- Changes in the locales "broke" previously working date formats. If the default locale is "en_AU" then the following won't work with JDK 9:new SimpleDateFormat("yyyy-MMM-dd").parse("2015-DEC-25")
Classes with annotations for dates now allow users to provide a locale. For example:
@Parsed
@Format(formats = "dd-MMM-yyyy", options = "locale=en_US_WIN")
private Date myDate;
//if you are in Australia, MMM will translate to the abbreviated format followed by period,
//i.e. "October" becomes "Oct.". The formatter won't work to parse dates such as "2015-Oct-20"
//Use "locale=en" to make it behave as it always did in Java 8 or earlier.
@Parsed
@Format(formats = "dd-MMM-yyyy", options = "locale=en")
private Date australianDay;
Also fixed a bug on the TrimConversion
introduced in version 2.5.5 - it would break processing blank or empty strings.