RE: Method isCheckedOut in DLFileEntryImpl.java bad implementation?

Jamie Sammons, modified 3 Years ago. New Member Post: 1 Join Date: 7/17/22 Recent Posts

As of version 7.4.3.25-ga25 and up (I didn't checked older versions) the implementation of "isCheckedOut" method in DLFileEntryImpl.java  uses: DLFileEntryServiceUtil.isFileEntryCheckedOut

This means it will check the permissions - that is not desirable I think on that low level.

Shouldn't be used: DLFileEntryLocalServiceUtil.isFileEntryCheckedOut to skip premission checking ?

for example hasLock() or getContentStream(String version) methods in the same class "DLFileEntryImpl.java " use "DLFileEntryLocalServiceUtil". 

thumbnail
Russell Bohl, modified 3 Years ago. Expert Posts: 308 Join Date: 2/13/13 Recent Posts

I'm inclined to say this is intentional, only because there's another instance of a remote service call in the DLFileEntryImpl class: DLFileVersionServiceUtil is also used. As someone who's never looked at this code before today, I can't explain why it's designed this way, but I don't think it's a bug. I could be wrong, of course.