@@ -55,10 +55,34 @@ public static List<Parameter> getParameters(final MethodSignature signature, fin
5555 }).collect (Collectors .toList ());
5656 }
5757
58+ @ SuppressWarnings ({
59+ "CyclomaticComplexity" ,
60+ "ReturnCount" ,
61+ "PMD.NcssCount" ,
62+ "PMD.CyclomaticComplexity"
63+ })
5864 public static String objectToString (final Object object ) {
5965 try {
60- if (Objects .nonNull (object ) && (object instanceof Object [])) {
61- return Arrays .toString ((Object []) object );
66+ if (Objects .nonNull (object ) && object .getClass ().isArray ()) {
67+ if (object instanceof Object []) {
68+ return Arrays .toString ((Object []) object );
69+ } else if (object instanceof long []) {
70+ return Arrays .toString ((long []) object );
71+ } else if (object instanceof short []) {
72+ return Arrays .toString ((short []) object );
73+ } else if (object instanceof int []) {
74+ return Arrays .toString ((int []) object );
75+ } else if (object instanceof char []) {
76+ return Arrays .toString ((char []) object );
77+ } else if (object instanceof double []) {
78+ return Arrays .toString ((double []) object );
79+ } else if (object instanceof float []) {
80+ return Arrays .toString ((float []) object );
81+ } else if (object instanceof boolean []) {
82+ return Arrays .toString ((boolean []) object );
83+ } else if (object instanceof byte []) {
84+ return Arrays .toString ((byte []) object );
85+ }
6286 }
6387 return Objects .toString (object );
6488 } catch (Exception e ) {
0 commit comments