myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lof...@apache.org
Subject svn commit: r923328 - /myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/config/TobagoConfigParser.java
Date Mon, 15 Mar 2010 16:27:06 GMT
Author: lofwyr
Date: Mon Mar 15 16:27:06 2010
New Revision: 923328

URL: http://svn.apache.org/viewvc?rev=923328&view=rev
Log:
code style + remove todo which was done

Modified:
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/config/TobagoConfigParser.java

Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/config/TobagoConfigParser.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/config/TobagoConfigParser.java?rev=923328&r1=923327&r2=923328&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/config/TobagoConfigParser.java
(original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/config/TobagoConfigParser.java
Mon Mar 15 16:27:06 2010
@@ -35,9 +35,10 @@ import java.net.URL;
 public class TobagoConfigParser {
 
   private static final Log LOG = LogFactory.getLog(TobagoConfigParser.class);
+
   private static final String TOBAGO_CONFIG_DTD = "/org/apache/myfaces/tobago/config/tobago-config_1_0.dtd";
 
-  public TobagoConfig parse(ServletContext context)  throws IOException, SAXException, FacesException
{
+  public TobagoConfig parse(ServletContext context) throws IOException, SAXException, FacesException
{
 
     TobagoConfig tobagoConfig = new TobagoConfig();
     Digester digester = configure(tobagoConfig);
@@ -72,9 +73,7 @@ public class TobagoConfigParser {
     return digester;
   }
 
-  // TODO: make it runnable without config file, using defaults
-  private void parse(ServletContext context, Digester digester)
-      throws IOException, SAXException, FacesException {
+  private void parse(ServletContext context, Digester digester) throws IOException, SAXException,
FacesException {
 
     String configPath = "/WEB-INF/tobago-config.xml";
     InputStream input = null;
@@ -94,19 +93,13 @@ public class TobagoConfigParser {
   private void registerDtd(Digester digester) {
     URL url = TobagoConfigParser.class.getResource(TOBAGO_CONFIG_DTD);
     if (LOG.isDebugEnabled()) {
-      LOG.debug("registering dtd: url=" + url);
+      LOG.debug("Registering dtd: url=" + url);
     }
     if (null != url) {
-      digester.register(
-          "-//Atanion GmbH//DTD Tobago Config 1.0//EN",
-          url.toString());
-      digester.register(
-          "-//The Apache Software Foundation//DTD Tobago Config 1.0//EN",
-          url.toString());
+      digester.register("-//Atanion GmbH//DTD Tobago Config 1.0//EN", url.toString());
+      digester.register("-//The Apache Software Foundation//DTD Tobago Config 1.0//EN", url.toString());
     } else {
-      LOG.warn(
-          "unable to retrieve local DTD '" + TOBAGO_CONFIG_DTD
-              + "'; trying external URL");
+      LOG.warn("Unable to retrieve local DTD '" + TOBAGO_CONFIG_DTD + "'; trying external
URL");
     }
   }
 



Mime
View raw message