Lets not call portletCategory.trim() twice, just assign it to a local final variable first.  Always remember DRY (don't repeat yourself)