Merged r1542769 from tomcat/trunk:
Work around false positive test failure

This issue was observed on Tomcat 7 buildbot,
e.g. Builder tomcat-7-trunk Build #1553

git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc7.0.x/trunk@1543015 13f79535-47bb-0310-9956-ffa450edef68
Merged r1542841 from tomcat/trunk:
Fix a FindBugs warning.
Throw NPE rather than triggering one.

git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc7.0.x/trunk@1543016 13f79535-47bb-0310-9956-ffa450edef68