@@ -49,24 +49,24 @@ public enum BuiltinParser implements Parser {
4949 Basic {
5050 private final Map <Class <?>, Function <String , Object >> parsers =
5151 ImmutableMap .<Class <?>, Function <String , Object >> builder ()
52- .put (BigDecimal .class , BigDecimal ::new )
53- .put (BigInteger .class , BigInteger ::new )
54- .put (Byte .class , Byte ::valueOf )
55- .put (byte .class , Byte ::valueOf )
56- .put (Double .class , Double ::valueOf )
57- .put (double .class , Double ::valueOf )
58- .put (Float .class , Float ::valueOf )
59- .put (float .class , Float ::valueOf )
60- .put (Integer .class , Integer ::valueOf )
61- .put (int .class , Integer ::valueOf )
62- .put (Long .class , this ::toLong )
63- .put (long .class , this ::toLong )
64- .put (Short .class , Short ::valueOf )
65- .put (short .class , Short ::valueOf )
66- .put (Boolean .class , this ::toBoolean )
67- .put (boolean .class , this ::toBoolean )
68- .put (Character .class , this ::toCharacter )
69- .put (char .class , this ::toCharacter )
52+ .put (BigDecimal .class , NOT_EMPTY . andThen ( BigDecimal ::new ) )
53+ .put (BigInteger .class , NOT_EMPTY . andThen ( BigInteger ::new ) )
54+ .put (Byte .class , NOT_EMPTY . andThen ( Byte ::valueOf ) )
55+ .put (byte .class , NOT_EMPTY . andThen ( Byte ::valueOf ) )
56+ .put (Double .class , NOT_EMPTY . andThen ( Double ::valueOf ) )
57+ .put (double .class , NOT_EMPTY . andThen ( Double ::valueOf ) )
58+ .put (Float .class , NOT_EMPTY . andThen ( Float ::valueOf ) )
59+ .put (float .class , NOT_EMPTY . andThen ( Float ::valueOf ) )
60+ .put (Integer .class , NOT_EMPTY . andThen ( Integer ::valueOf ) )
61+ .put (int .class , NOT_EMPTY . andThen ( Integer ::valueOf ) )
62+ .put (Long .class , NOT_EMPTY . andThen ( this ::toLong ) )
63+ .put (long .class , NOT_EMPTY . andThen ( this ::toLong ) )
64+ .put (Short .class , NOT_EMPTY . andThen ( Short ::valueOf ) )
65+ .put (short .class , NOT_EMPTY . andThen ( Short ::valueOf ) )
66+ .put (Boolean .class , NOT_EMPTY . andThen ( this ::toBoolean ) )
67+ .put (boolean .class , NOT_EMPTY . andThen ( this ::toBoolean ) )
68+ .put (Character .class , NOT_EMPTY . andThen ( this ::toCharacter ) )
69+ .put (char .class , NOT_EMPTY . andThen ( this ::toCharacter ) )
7070 .put (String .class , this ::toString )
7171 .build ();
7272
0 commit comments