ivicac/liferay-portal — comment on commit 144b4fa963a19f805424cc1351d99b8d5ff365f1
File: portal-impl/src/com/liferay/portlet/documentlibrary/service/impl/DLAppServiceImpl.java line 424
By caorongjin:

checkInFileEntry() actually needs to be much more complicated than this one. Because, you are assuming that the last approved version has the same preview images as the current one – which is most likely not true. In fact, if somebody checks out the file, they may change the binary multiple times in the PWC until they check it back in. However, this may also mean that they may change it back to the original file before checking it back in.