Q:

Why IntegerValidator from Apache Commons fails with this number

I'm using the Apache Commons Validator library to validate an integer. With this code:
public class App
{
    public static void main( String[] args )
    {
    System.out.println("Validate 0.1: " + IntegerValidator.getInstance().isValid("0.1"));
    }
}

This code returns true, I don't know why. 0.1, at least for me, is not an integer. Also my locale is es_ES.UTF-8 and I'm running this code in an MacOS X 10.10 ... 
But, under Linux (with locale en_US.UTF-8) works fine:
terron@ubuntuelastic:~/checkApacheCommon/target$ java -classpath checkApacheCommon-1.0-SNAPSHOT.jar:commons-validator-1.4.0.jar  org.ctb.maven.App
Validate 0.1: false

Is there any bug in the library or in OS X related to this system? 

A:

In es_ES locale (Spanish), dot "." is a thousands separator, not a decimal point. So 0.1 is interpreted as 1. One tenth would be written with a decimal comma: 0,1.
In your second example you're using en_US locale, where dot is indeed a decimal point.

