code: private static Type checkArraysCommodity(final Type first,
                                               final Type second,
                                               final boolean alwaysIncludeInterfaces,
                                               final PathsCache cache) {
          // special case for arrays because of primitive arrays
          final boolean firstArray = ArrayTypeUtils.isArray(first);
          final boolean secondArray = ArrayTypeUtils.isArray(second);
  
          final Type res;
  
          if (firstArray && secondArray) {
              // base array types must be matched
              final Type firstArrayType = ArrayTypeUtils.getArrayComponentType(first);
              final Type secondArrayType = ArrayTypeUtils.getArrayComponentType(second);
  
              // special case: primitives arrays are equal only to themselves (only same type or Object)
              if ((firstArrayType instanceof Class && ((Class) firstArrayType).isPrimitive())
                      || (secondArrayType instanceof Class && ((Class) secondArrayType).isPrimitive())) {
                  // equal arrays case is implicitly checked before (by isCompatible), so these are not equal
                  res = Object.class;
              } else {
                  res = ArrayTypeUtils.toArrayType(
                          buildImpl(firstArrayType, secondArrayType, alwaysIncludeInterfaces, cache));
              }
          } else {
              // array can't share anything with non array
              res = Object.class;
          }
          return res;
      }
docs: Arrays in java are not affected by autoboxing and so primitive arrays could match only with Object or
  primitive array with exactly the same type (e.g. {@code int[]} and {@code Integer[]} are not the same and
  can't be assigned).
  <p>
  For not primitive types commodity calculated from contained type.
  <p>
  Assumed that direct types equality is already checked before call (with {@code TypeUtils.isCompatible()}).
  
  @param first                   first type
  @param second                  second type
  @param alwaysIncludeInterfaces always search for common interfaces
  @param cache                   resolution types cache
  @return common type or null if non of types is array