hhuijser/liferay-portal — pull request #2163 by willnewbury (2014-10-09 17:37:07+00:00)
Title: LPS-49294-SourceFormatter

This is a resend of the previous pull request, with all of the fixes made and the revisions sent seperately cherry-picked on top. To address the issues that we were talking about:

Merging - like I said, I cherry-picked that branch on to here, rebased onto latest master - no issues. I am not sure what problems you were getting, but if you give me more information on how to reproduce them I might be able to look at them.

AnnotationLocatorTest (what you emailed me about) - I ran the test again just to triple-check that everything was working, no issue - I am not sure exactly what the issue is here. While I believe the logic to be correct, if your email was instead refering to the problem lying in the fact that we capitalized queueSuperMethod there are a couple reasons I didn't change it. First, the setAccessible is located in the static initializaion block, so should be exempt from our considerations of immutability, as it is just initailization. Second irregardless of the first point, setAccessible changes the method, but does not actually create a new one to override the reference, allowing it to still be final, and in a manner of speaking immutable. If that is still unsatisfactory, we use a similar method as we did in other places - create a temporary Method variable (ie a queueSuperTypesMethod variable) and then set the final variable at the end of static initialization block.

SuccessStructsAction - I changed the variable to not follow immutable capitalization, should be more logical now.