Simplify. No change in functionality.
This backports part of r1604066.

git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc7.0.x/trunk@1604910 13f79535-47bb-0310-9956-ffa450edef68
Simplify. No change in functionality.
Save contexts[pos] in a local variable.
This backports part of r1604437.

git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc7.0.x/trunk@1604915 13f79535-47bb-0310-9956-ffa450edef68
Simplify.
If there is only one version available, use it and skip exactFind(version) call.

Also skip "if (contextVersion != null)" check before internalMapWrapper() call,
as "contextVersion.object" dereference should have thrown an NPE in that case.

This completes backport of r1604437.

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