[java-opensaml2 COMMIT] in /branches/REL_2: doc/RELEASE-NOTES.txt src/main/java/org/opensaml/DefaultBootstrap.java

noreply at shibboleth.net noreply at shibboleth.net
Wed May 2 22:34:45 BST 2012


Author: putmanb
Date: Wed May  2 22:34:45 2012
New Revision: 1574

URL: http://svn.shibboleth.net/view/java-opensaml2?rev=1574&view=rev
Log:
JOST-188: DefaultBootstrap is unnecessarily calling Velocity singleton initialization

Modified:
    branches/REL_2/doc/RELEASE-NOTES.txt
    branches/REL_2/src/main/java/org/opensaml/DefaultBootstrap.java

Modified: branches/REL_2/doc/RELEASE-NOTES.txt
URL: http://svn.shibboleth.net/view/java-opensaml2/branches/REL_2/doc/RELEASE-NOTES.txt?rev=1574&r1=1573&r2=1574&view=diff
==============================================================================
--- branches/REL_2/doc/RELEASE-NOTES.txt (original)
+++ branches/REL_2/doc/RELEASE-NOTES.txt Wed May  2 22:34:45 2012
@@ -2,6 +2,7 @@
 =============================================
 [JOST-185] - Defaultbootstrap does not initialize the providers from the WS-Trust and WS-Policy schemas in openws
 [JOST-187] - Velocity initialization code uses an invalid key for the configuration properties set
+[JOST-188] - DefaultBootstrap is unnecessarily calling Velocity singleton initialization
 
 Changes in Release 2.5.3
 =============================================

Modified: branches/REL_2/src/main/java/org/opensaml/DefaultBootstrap.java
URL: http://svn.shibboleth.net/view/java-opensaml2/branches/REL_2/src/main/java/org/opensaml/DefaultBootstrap.java?rev=1574&r1=1573&r2=1574&view=diff
==============================================================================
--- branches/REL_2/src/main/java/org/opensaml/DefaultBootstrap.java (original)
+++ branches/REL_2/src/main/java/org/opensaml/DefaultBootstrap.java Wed May  2 22:34:45 2012
@@ -17,8 +17,6 @@
 
 package org.opensaml;
 
-import org.apache.velocity.app.Velocity;
-import org.apache.velocity.runtime.RuntimeConstants;
 import org.apache.xml.security.Init;
 import org.opensaml.saml1.binding.artifact.SAML1ArtifactBuilderFactory;
 import org.opensaml.saml2.binding.artifact.SAML2ArtifactBuilderFactory;
@@ -87,8 +85,6 @@
     public static synchronized void bootstrap() throws ConfigurationException {
 
         initializeXMLSecurity();
-
-        initializeVelocity();
 
         initializeXMLTooling(xmlToolingConfigs);
 
@@ -163,28 +159,6 @@
     }
 
     /**
-     * Intializes the Apache Velocity template engine.
-     * 
-     * @throws ConfigurationException thrown if there is a problem initializing Velocity
-     */
-    protected static void initializeVelocity() throws ConfigurationException {
-        Logger log = getLogger();
-        try {
-            log.debug("Initializing Velocity template engine");
-            Velocity.setProperty(RuntimeConstants.RUNTIME_LOG_LOGSYSTEM_CLASS,
-                    "org.apache.velocity.runtime.log.NullLogChute");
-            Velocity.setProperty(RuntimeConstants.INPUT_ENCODING, "UTF-8");
-            Velocity.setProperty(RuntimeConstants.OUTPUT_ENCODING, "UTF-8");
-            Velocity.setProperty(RuntimeConstants.RESOURCE_LOADER, "classpath");
-            Velocity.setProperty("classpath.resource.loader.class",
-                    "org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader");
-            Velocity.init();
-        } catch (Exception e) {
-            throw new ConfigurationException("Unable to initialize Velocity template engine", e);
-        }
-    }
-
-    /**
      * Initializes the XMLTooling library with a default set of object providers.
      * 
      * @param providerConfigs list of provider configuration files located on the classpath



More information about the commits mailing list