Skip to content

Commit

Permalink
[Dubbo-6177] PojoUtils realize not current for Multidimensional primi…
Browse files Browse the repository at this point in the history
…tive array #6177 (#6178)
  • Loading branch information
sqtds authored Feb 23, 2021
1 parent 6db0dc1 commit 23e38e4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,8 @@ private ReflectUtils() {
}

public static boolean isPrimitives(Class<?> cls) {
if (cls.isArray()) {
return isPrimitive(cls.getComponentType());
while (cls.isArray()) {
cls = cls.getComponentType();
}
return isPrimitive(cls);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,11 @@ public void test_PrimitiveArray() throws Exception {
assertArrayObject(new Float[]{37F, -39F, 123456.7F});

assertArrayObject(new Double[]{37D, -39D, 123456.7D});

assertObject(new int[][]{{37, -39, 12456}});
assertObject(new Integer[][][]{{{37, -39, 12456}}});

assertArrayObject(new Integer[]{37, -39, 12456});
}

@Test
Expand Down

0 comments on commit 23e38e4

Please sign in to comment.