liferay/liferay-portal — pull request #596 by zxdgoal (2014-06-26 15:19:01+00:00)
Title: add extension for file name to pass the check.

I realized that the sourceFileName is appended with TEMP_RANDOM_SUFFIX and random string to make it unique. However, in this way, it doesn't end with a valid extension. So I append its extension after the random string. As when this file is going to be deleted, its original name is retrieved from soureceFileName (the string after TEMP_RANDOM_SUFFIX will be discarded), the appended extension will not affect the performance.
I not sure if it is the correct answer.