code: private static void deeplyAppendParameter(StringBuilder sbuf, Object o,
                                                Set<Object[]> seenSet) {
          if (o == null) {
              sbuf.append("null");
              return;
          }
          Class<?> objClass = o.getClass();
          if (!objClass.isArray()) {
              if (Number.class.isAssignableFrom(objClass)) {
                  // Prevent String instantiation for some number types
                  if (objClass == Long.class) {
                      sbuf.append(((Long) o).longValue());
                  } else if (objClass == Integer.class || objClass == Short.class || objClass == Byte.class) {
                      sbuf.append(((Number) o).intValue());
                  } else if (objClass == Double.class) {
                      sbuf.append(((Double) o).doubleValue());
                  } else if (objClass == Float.class) {
                      sbuf.append(((Float) o).floatValue());
                  } else {
                      safeObjectAppend(sbuf, o);
                  }
              } else {
                  safeObjectAppend(sbuf, o);
              }
          } else {
              // check for primitive array types because they
              // unfortunately cannot be cast to Object[]
              sbuf.append('[');
              if (objClass == boolean[].class) {
                  booleanArrayAppend(sbuf, (boolean[]) o);
              } else if (objClass == byte[].class) {
                  byteArrayAppend(sbuf, (byte[]) o);
              } else if (objClass == char[].class) {
                  charArrayAppend(sbuf, (char[]) o);
              } else if (objClass == short[].class) {
                  shortArrayAppend(sbuf, (short[]) o);
              } else if (objClass == int[].class) {
                  intArrayAppend(sbuf, (int[]) o);
              } else if (objClass == long[].class) {
                  longArrayAppend(sbuf, (long[]) o);
              } else if (objClass == float[].class) {
                  floatArrayAppend(sbuf, (float[]) o);
              } else if (objClass == double[].class) {
                  doubleArrayAppend(sbuf, (double[]) o);
              } else {
                  objectArrayAppend(sbuf, (Object[]) o, seenSet);
              }
              sbuf.append(']');
          }
      }
docs: special treatment of array values was suggested by 'lizongbo'