hhuijser/liferay-portal — pull request #1803 by jonathanmccann (2014-03-19 17:06:40+00:00)
Title: LPS-45172

Some notes of things I looked at:

CommandArgument - I don't like having the exception twice, but this is the simplest way to get the groupId and outputting the "currentGroupName" might be confusing.

FindAction - I left in the for loop for the portletIds. I didn't like it at first since there could be a lot of portletIds, but having those outputted would be helpful in debugging since they're used to check the layout.

ActionUtil - Throwing a NoSuchMessageException containing the threadId seemed strange at first, but this method is getting the rootMessage and if that does not exist (or is in the trash) then the same goes for the thread and the rootMessageId is easily found out if you have the threadId.

Also, from Preston:

"I removed the (id <= 0) logic because the id should never be in that range if for the actual non-null object, so they will be unequal anyway."

Let me know if you have any questions.