TOMEE-1416

Simplified several expressions and conditions due to the fact that they were unnecessary or tested ahead.