LPS-44236

Hi Ray,

I refactored according to your instructions, however I wasn't able to deploy the portal due to some weird SASS compile errors.

If you change something please send back a PR to me and I'll try to test again tomorrow.

1) Please don't just add more commits which fix bugs caused in earlier commits of the same pull request. Fix the actual commit which caused the bug in the pull request. Use interactive rebase to reorganize and squash such commits back where they belong.

OK, Done

2) The naming convention for private variables is that they begin with _ and we try not to use this. where possible.

Yeah, I know and did it as you suggested this time. Nevertheless, I found 6497 occurrences for "this." in the portal and in general for the usage protected instance variables.

3) There are already getter methods, and these should never need to be accessed otherwise. In fact they should also be set as final as they must be set in the constructor. 

OK, Done.

4) Make sure in the default constructor that you properly set instance variables to real objects, otherwise UserPermissionCheckerBagImpl objects resulting from default constructor may lead to errors (you will always have to do null checks on the method returns, which is unnecessary).

OK, Done.

5) It's very bad design to leave a constructor which does not set the instance variables properly.

OK, Changed the original behaviour.

Cheers,
Laci.