private static Integer checkQuietly ( final String name , final Integer value ) { Integer val = 50 ; try { val = Args . withinRange ( 0 , 100 , value , name ) ; } catch ( final IllegalArgumentException e ) { LOGGER . error ( String . format ( "Given argument '%s' must have a value within [%s,%s], but was %s. Default value 50% will be set." , name , 0 , 100 , value ) ) ; } return val ; }
Checks the given value if it is between 0 to 100 quietly . If not a default value from 50 will be set .