thrownewIllegalArgumentException("Invalid attribute class "+clazz.getCanonicalName());
...
...
@@ -109,15 +112,16 @@ public class JsonAttributeParser<T extends Object> {
publicTgetValue(StringjsonString){
Preconditions.checkNotNull(jsonString);
Matchermatcher=pattern.matcher(jsonString);
finalMatchermatcher=pattern.matcher(jsonString);
if(!matcher.find())returnnull;
finalStringvalue=matcher.group(1);
try{
returnparseValue(matcher.group(1));
returnparseValue(value);
}
catch(NumberFormatExceptione){
thrownewIllegalArgumentException(String.format("Unable to parse value '%' on attribute '%s' : %s. Expected type: %s",matcher.group(1),attributeName,e.getMessage(),type.name()));
thrownewIllegalArgumentException(String.format("Unable to parse value '%' on attribute '%s' : %s. Expected type: %s",value,attributeName,e.getMessage(),type.name()),e);