Skip to content

Commit 43bdfbf

Browse files
authored
Merge pull request #179 from laurgarn/preserve_null_boxed_primitives_roundtrip
Preserve null boxed primitives roundtrip
2 parents 1463fa8 + 47f4c81 commit 43bdfbf

File tree

2 files changed

+5
-46
lines changed

2 files changed

+5
-46
lines changed

src/main/java/com/cedarsoftware/util/io/MetaUtils.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -720,14 +720,18 @@ static Object[] fillArgs(Class[] argTypes, boolean useNull)
720720
for (int i = 0; i < argTypes.length; i++)
721721
{
722722
final Class argType = argTypes[i];
723-
if (isPrimitive(argType))
723+
if (argType.isPrimitive())
724724
{
725725
values[i] = convert(argType, null);
726726
}
727727
else if (useNull)
728728
{
729729
values[i] = null;
730730
}
731+
else if (prims.contains(argType))
732+
{
733+
values[i] = convert(argType, null);
734+
}
731735
else
732736
{
733737
if (argType == String.class)

src/test/groovy/com/cedarsoftware/util/io/TestNullInteger.groovy

Lines changed: 0 additions & 45 deletions
This file was deleted.

0 commit comments

Comments
 (0)