@Override
    @SuppressWarnings("PMD.UselessParentheses")
    public boolean equals(final Object o) {
        boolean res = this == o;
        if (!res && o instanceof ParameterizedType) {
            final ParameterizedType that = (ParameterizedType) o;
            final Type[] thatActualArguments = that.getActualTypeArguments();
            final Type thatOwnerType = that.getOwnerType();
            final Type thatRawType = that.getRawType();

            res = Arrays.equals(actualArguments, thatActualArguments)
                    && (ownerType != null ? ownerType.equals(thatOwnerType) : thatOwnerType == null)
                    && (rawType != null ? rawType.equals(thatRawType) : thatRawType == null);
        }
        return res;
    }