public static <T> T cloneIfPossible(final T obj) {
        final T clone = clone(obj);
        return clone == null ? obj : clone;
    }
<p>Clone an object if possible.</p>

<p>This method is similar to {@link #clone(Object)}, but will return the provided
instance as the return value instead of {@code null} if the instance
is not cloneable. This is more convenient if the caller uses different
implementations (e.g. of a service) and some of the implementations do not allow concurrent
processing or have state. In such cases the implementation can simply provide a proper
clone implementation and the caller's code does not have to change.</p>

@param <T> the type of the object
@param obj  the object to clone, null returns null
@return the clone if the object implements {@link Cloneable} otherwise the object itself
@throws CloneFailedException if the object is cloneable and the clone operation fails
@since 3.0
android/android_framework/base/src/main/java/lang3/ObjectUtils.java