Author: aogburn
Date: 2013-05-31 16:27:18 -0400 (Fri, 31 May 2013)
New Revision: 2208
Modified:
branches/JBOSSWEB_7_2_0_FINAL_BZ-968578/
branches/JBOSSWEB_7_2_0_FINAL_BZ-968578/src/main/java/org/apache/catalina/startup/ContextConfig.java
Log:
[BZ-968578] backport fix for one-off patch
Property changes on: branches/JBOSSWEB_7_2_0_FINAL_BZ-968578
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.2.x:2185
Modified:
branches/JBOSSWEB_7_2_0_FINAL_BZ-968578/src/main/java/org/apache/catalina/startup/ContextConfig.java
===================================================================
---
branches/JBOSSWEB_7_2_0_FINAL_BZ-968578/src/main/java/org/apache/catalina/startup/ContextConfig.java 2013-05-31
12:54:47 UTC (rev 2207)
+++
branches/JBOSSWEB_7_2_0_FINAL_BZ-968578/src/main/java/org/apache/catalina/startup/ContextConfig.java 2013-05-31
20:27:18 UTC (rev 2208)
@@ -84,6 +84,20 @@
*/
protected static Properties authenticators = null;
+ static {
+ // Load our mapping properties
+ authenticators = new Properties();
+ try {
+ InputStream is =
ContextConfig.class.getClassLoader().getResourceAsStream("org/apache/catalina/startup/Authenticators.properties");
+ if (is != null) {
+ authenticators.load(is);
+ } else {
+ CatalinaLogger.STARTUP_LOGGER.cannotFindAuthenticatoMappings();
+ }
+ } catch (IOException e) {
+ CatalinaLogger.STARTUP_LOGGER.failedLoadingAuthenticatoMappings(e);
+ }
+ }
/**
* The Context we are associated with.
@@ -233,25 +247,6 @@
customAuthenticators.get(loginConfig.getAuthMethod());
}
if (authenticator == null) {
- // Load our mapping properties if necessary
- if (authenticators == null) {
- try {
- InputStream
is=this.getClass().getClassLoader().getResourceAsStream("org/apache/catalina/startup/Authenticators.properties");
- if( is!=null ) {
- authenticators = new Properties();
- authenticators.load(is);
- } else {
- CatalinaLogger.STARTUP_LOGGER.cannotFindAuthenticatoMappings();
- ok=false;
- return;
- }
- } catch (IOException e) {
- CatalinaLogger.STARTUP_LOGGER.failedLoadingAuthenticatoMappings(e);
- ok = false;
- return;
- }
- }
-
// Identify the class name of the Valve we should configure
String authenticatorName = null;
authenticatorName =
Show replies by thread