@@ -416,6 +416,8 @@ public void testGetByteValue() {
416416 assertEquals (val , MapUtils .getByteValue (in , "key" ), 0 );
417417 assertEquals (val , MapUtils .getByteValue (in , "noKey" , val ), 0 );
418418 assertEquals (val , MapUtils .getByteValue (in , "noKey" , key -> (byte ) 100 ), 0 );
419+ assertEquals (Byte .MIN_VALUE , MapUtils .getByteValue (in , "noKey" , Byte .MIN_VALUE ), 0 );
420+ assertEquals (Byte .MAX_VALUE , MapUtils .getByteValue (in , "noKey" , Byte .MAX_VALUE ), 0 );
419421 assertEquals (0 , MapUtils .getByteValue (in , "noKey" ), 0 );
420422 assertEquals (val , MapUtils .getByte (in , "key" , val ), 0 );
421423 assertEquals (val , MapUtils .getByte (in , "noKey" , val ), 0 );
@@ -436,6 +438,9 @@ public void testGetDoubleValue() {
436438 assertEquals (2.0 , MapUtils .getDoubleValue (in , "key" ), 0 );
437439 assertEquals (1.0 , MapUtils .getDoubleValue (in , "noKey" , 1.0 ), 0 );
438440 assertEquals (5.0 , MapUtils .getDoubleValue (in , "noKey" , key -> 5.0D ), 0 );
441+ assertEquals (Double .MIN_VALUE , MapUtils .getDoubleValue (in , "noKey" , Double .MIN_VALUE ), 0 );
442+ assertEquals (Double .MIN_NORMAL , MapUtils .getDoubleValue (in , "noKey" , Double .MIN_NORMAL ), 0 );
443+ assertEquals (Double .MAX_VALUE , MapUtils .getDoubleValue (in , "noKey" , Double .MAX_VALUE ), 0 );
439444
440445 assertEquals (0 , MapUtils .getDoubleValue (in , "noKey" ), 0 );
441446 assertEquals (2.0 , MapUtils .getDouble (in , "key" , 0.0 ), 0 );
@@ -458,6 +463,9 @@ public void testGetFloatValue() {
458463 assertEquals (2.0 , MapUtils .getFloatValue (in , "key" ), 0 );
459464 assertEquals (1.0 , MapUtils .getFloatValue (in , "noKey" , 1.0f ), 0 );
460465 assertEquals (1.0 , MapUtils .getFloatValue (in , "noKey" , key -> 1.0F ), 0 );
466+ assertEquals (Float .MIN_VALUE , MapUtils .getFloatValue (in , "noKey" , Float .MIN_VALUE ), 0 );
467+ assertEquals (Float .MIN_NORMAL , MapUtils .getFloatValue (in , "noKey" , Float .MIN_NORMAL ), 0 );
468+ assertEquals (Float .MAX_VALUE , MapUtils .getFloatValue (in , "noKey" , Float .MAX_VALUE ), 0 );
461469 assertEquals (0 , MapUtils .getFloatValue (in , "noKey" ), 0 );
462470 assertEquals (2.0 , MapUtils .getFloat (in , "key" , 0.0f ), 0 );
463471 assertEquals (1.0 , MapUtils .getFloat (in , "noKey" , 1.0f ), 0 );
@@ -479,6 +487,8 @@ public void testGetIntValue() {
479487 assertEquals (2 , MapUtils .getIntValue (in , "key" ), 0 );
480488 assertEquals (0 , MapUtils .getIntValue (in , "noKey" , 0 ), 0 );
481489 assertEquals (0 , MapUtils .getIntValue (in , "noKey" , key -> 0 ), 0 );
490+ assertEquals (Integer .MIN_VALUE , MapUtils .getIntValue (in , "noKey" , Integer .MIN_VALUE ), 0 );
491+ assertEquals (Integer .MAX_VALUE , MapUtils .getIntValue (in , "noKey" , Integer .MAX_VALUE ), 0 );
482492 assertEquals (0 , MapUtils .getIntValue (in , "noKey" ), 0 );
483493 assertEquals (2 , MapUtils .getInteger (in , "key" , 0 ), 0 );
484494 assertEquals (0 , MapUtils .getInteger (in , "noKey" , 0 ), 0 );
@@ -578,6 +588,8 @@ public void testGetShortValue() {
578588 assertEquals (val , MapUtils .getShortValue (in , "key" ), 0 );
579589 assertEquals (val , MapUtils .getShortValue (in , "noKey" , val ), 0 );
580590 assertEquals (val , MapUtils .getShortValue (in , "noKey" , key -> val ), 0 );
591+ assertEquals (Short .MIN_VALUE , MapUtils .getShortValue (in , "noKey" , Short .MIN_VALUE ), 0 );
592+ assertEquals (Short .MAX_VALUE , MapUtils .getShortValue (in , "noKey" , Short .MAX_VALUE ), 0 );
581593 assertEquals (0 , MapUtils .getShortValue (in , "noKey" ), 0 );
582594 assertEquals (val , MapUtils .getShort (in , "key" , val ), 0 );
583595 assertEquals (val , MapUtils .getShort (in , "noKey" , val ), 0 );
0 commit comments