mirror of
https://github.com/Kingsrook/qqq.git
synced 2025-07-18 05:01:07 +00:00
Add byte[] as a type that we can getAsString
This commit is contained in:
@ -69,6 +69,10 @@ public class ValueUtils
|
||||
{
|
||||
return (s);
|
||||
}
|
||||
else if(value instanceof byte[] ba)
|
||||
{
|
||||
return (new String(ba));
|
||||
}
|
||||
else
|
||||
{
|
||||
return (String.valueOf(value));
|
||||
|
@ -68,6 +68,7 @@ class ValueUtilsTest extends BaseTest
|
||||
assertEquals("1", ValueUtils.getValueAsString(1));
|
||||
assertEquals("1", ValueUtils.getValueAsString(1));
|
||||
assertEquals("1.10", ValueUtils.getValueAsString(new BigDecimal("1.10")));
|
||||
assertEquals("ABC", ValueUtils.getValueAsString(new byte[] { 65, 66, 67 }));
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user