How to call a method which assigns a new value to argument if it's null in Java? : <p>I'm thinking about <code>validateEntity</code>. What do you think about it?</p>

<pre><code>T validateEntity(@Nullable T entity)
{
    if (entity == null)
    {
        entity = DEFAULT_ENTITY;
    }
    return entity;
}
</code></pre>
