Conversion bug (different behavior between java6 and java7) #71

lviggiano opened this Issue Feb 25, 2014 · 0 comments


None yet
1 participant

lviggiano commented Feb 25, 2014

    public static interface PrimitiveTypesConfig extends Config {
        Integer invalid();

    @Test(expected = UnsupportedOperationException.class)
    public void testInvalid() {
        PrimitiveTypesConfig config = ConfigFactory.create(PrimitiveTypesConfig.class);

is raising NumberFormatException on java 7:

java.lang.NumberFormatException: For input string: "invalid"
        at java.lang.NumberFormatException.forInputString(
        at java.lang.Integer.parseInt(
        at java.lang.Integer.valueOf(
        at java.lang.Integer.decode(
        at com.sun.beans.editors.IntegerEditor.setAsText(
        at org.aeonbits.owner.Converters$4.tryConvert(

is raising UnsupportedOperationException on java 6

java.lang.UnsupportedOperationException: Cannot convert 'invalid' to java.lang.Integer
    at org.aeonbits.owner.Util.unsupported(
    at org.aeonbits.owner.Converters.unsupportedConversion(
    at org.aeonbits.owner.Converters.access$200(
    at org.aeonbits.owner.Converters$10.tryConvert(

@lviggiano lviggiano added this to the 1.0.6 milestone Feb 25, 2014

@lviggiano lviggiano added the bug label Feb 25, 2014

@lviggiano lviggiano self-assigned this Feb 25, 2014

lviggiano added a commit that referenced this issue Feb 25, 2014

@lviggiano lviggiano closed this Feb 25, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment