[seam-commits] Seam SVN: r9628 - in trunk/src: main/org/jboss/seam/navigation and 3 other directories.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Mon Nov 24 13:28:13 EST 2008


Author: dan.j.allen
Date: 2008-11-24 13:28:13 -0500 (Mon, 24 Nov 2008)
New Revision: 9628

Modified:
   trunk/src/main/org/jboss/seam/init/Initialization.java
   trunk/src/main/org/jboss/seam/navigation/Pages.java
   trunk/src/main/org/jboss/seam/pageflow/Page.java
   trunk/src/main/org/jboss/seam/servlet/SeamCharacterEncodingFilter.java
   trunk/src/test/unit/org/jboss/seam/test/unit/MailTest.java
Log:
JBSEAM-3747

Modified: trunk/src/main/org/jboss/seam/init/Initialization.java
===================================================================
--- trunk/src/main/org/jboss/seam/init/Initialization.java	2008-11-24 17:43:23 UTC (rev 9627)
+++ trunk/src/main/org/jboss/seam/init/Initialization.java	2008-11-24 18:28:13 UTC (rev 9628)
@@ -438,7 +438,7 @@
       }
       ScopeType scope = scopeName == null ? ScopeType.UNSPECIFIED : ScopeType.valueOf(scopeName
                .toUpperCase());
-      boolean autoCreate = "true".equals(factory.attributeValue("auto-create"));
+      boolean autoCreate = Boolean.parseBoolean(factory.attributeValue("auto-create"));
       factoryDescriptors.add(new FactoryDescriptor(name, scope, method, value, autoCreate));
    }
 
@@ -457,7 +457,7 @@
    {  
       String installText = component.attributeValue("installed");
       boolean installed = false;
-      if (installText == null || "true".equals(replace(installText, replacements)))
+      if (installText == null || Boolean.parseBoolean(replace(installText, replacements)))
       {
          installed = true;
       }
@@ -468,9 +468,9 @@
       int precedence = precedenceString==null ? Install.APPLICATION : Integer.valueOf(precedenceString);
       ScopeType scope = scopeName == null ? null : ScopeType.valueOf(scopeName.toUpperCase());
       String autocreateAttribute = component.attributeValue("auto-create");
-      Boolean autoCreate = autocreateAttribute==null ? null : "true".equals(autocreateAttribute);
+      Boolean autoCreate = autocreateAttribute==null ? null : Boolean.parseBoolean(autocreateAttribute);
       String startupAttribute = component.attributeValue("startup");
-      Boolean startup = startupAttribute==null ? null : "true".equals(startupAttribute);
+      Boolean startup = startupAttribute==null ? null : Boolean.parseBoolean(startupAttribute);
       String startupDependsAttribute = component.attributeValue("startupDepends");
       String[] startupDepends = startupDependsAttribute==null ? new String[0] : startupDependsAttribute.split(" ");
 

Modified: trunk/src/main/org/jboss/seam/navigation/Pages.java
===================================================================
--- trunk/src/main/org/jboss/seam/navigation/Pages.java	2008-11-24 17:43:23 UTC (rev 9627)
+++ trunk/src/main/org/jboss/seam/navigation/Pages.java	2008-11-24 18:28:13 UTC (rev 9628)
@@ -1199,8 +1199,8 @@
       {
          page.setNoConversationViewId(Expressions.instance().createValueExpression(noConversationViewIdString, String.class));
       }
-      page.setConversationRequired("true".equals(element.attributeValue("conversation-required")));
-      page.setLoginRequired("true".equals(element.attributeValue("login-required")));
+      page.setConversationRequired(Boolean.parseBoolean(element.attributeValue("conversation-required")));
+      page.setLoginRequired(Boolean.parseBoolean(element.attributeValue("login-required")));
       page.setScheme(element.attributeValue("scheme"));
       
       String expiresValue = element.attributeValue("expires");
@@ -1290,8 +1290,8 @@
       if ( endConversation!=null )
       {
          control.setEndConversation(true);
-         control.setEndConversationBeforeRedirect( "true".equals( endConversation.attributeValue("before-redirect") ) );
-         control.setEndRootConversation( "true".equals( endConversation.attributeValue("root") ) );
+         control.setEndConversationBeforeRedirect( Boolean.parseBoolean( endConversation.attributeValue("before-redirect") ) );
+         control.setEndRootConversation( Boolean.parseBoolean( endConversation.attributeValue("root") ) );
          String expression = endConversation.attributeValue("if");
          if (expression!=null)
          {
@@ -1305,8 +1305,8 @@
       if ( beginConversation!=null )
       {
          control.setBeginConversation(true);
-         control.setJoin( "true".equals( beginConversation.attributeValue("join") ) );
-         control.setNested( "true".equals( beginConversation.attributeValue("nested") ) );
+         control.setJoin( Boolean.parseBoolean( beginConversation.attributeValue("join") ) );
+         control.setNested( Boolean.parseBoolean( beginConversation.attributeValue("nested") ) );
          control.setPageflow( beginConversation.attributeValue("pageflow") );
          control.setConversationName( beginConversation.attributeValue("conversation") );
          String flushMode = beginConversation.attributeValue("flush-mode");
@@ -1500,7 +1500,7 @@
       {
          param.setValidatorValueExpression(Expressions.instance().createValueExpression(validatorExpression));
       }
-      param.setRequired( "true".equals( element.attributeValue("required") ) );
+      param.setRequired( Boolean.parseBoolean( element.attributeValue("required") ) );
       return param;
    }
    

Modified: trunk/src/main/org/jboss/seam/pageflow/Page.java
===================================================================
--- trunk/src/main/org/jboss/seam/pageflow/Page.java	2008-11-24 17:43:23 UTC (rev 9627)
+++ trunk/src/main/org/jboss/seam/pageflow/Page.java	2008-11-24 18:28:13 UTC (rev 9628)
@@ -61,7 +61,7 @@
       if ( endConversationElement!=null )
       {
          isConversationEnd = true;
-         isConversationEndBeforeRedirect = "true".equals( endConversationElement.attributeValue("before-redirect") );
+         isConversationEndBeforeRedirect = Boolean.parseBoolean( endConversationElement.attributeValue("before-redirect") );
          processToCreate = endConversationElement.attributeValue("create-process");
       }
       Element endTaskElement = pageElement.element("end-task");
@@ -70,7 +70,7 @@
          isTaskEnd = true;
          transition = endTaskElement.attributeValue("transition");
       }
-      redirect = "true".equals( pageElement.attributeValue("redirect") );
+      redirect = Boolean.parseBoolean( pageElement.attributeValue("redirect") );
       if ( pageElement.element("redirect")!=null )
       {
          redirect = true;

Modified: trunk/src/main/org/jboss/seam/servlet/SeamCharacterEncodingFilter.java
===================================================================
--- trunk/src/main/org/jboss/seam/servlet/SeamCharacterEncodingFilter.java	2008-11-24 17:43:23 UTC (rev 9627)
+++ trunk/src/main/org/jboss/seam/servlet/SeamCharacterEncodingFilter.java	2008-11-24 18:28:13 UTC (rev 9628)
@@ -22,7 +22,7 @@
    {
       super.init(config);
       setEncoding( config.getInitParameter("encoding") );
-      setOverrideClient( "true".equals( config.getInitParameter("overrideClient") ) );
+      setOverrideClient( Boolean.parseBoolean( config.getInitParameter("overrideClient") ) );
    }
    
 

Modified: trunk/src/test/unit/org/jboss/seam/test/unit/MailTest.java
===================================================================
--- trunk/src/test/unit/org/jboss/seam/test/unit/MailTest.java	2008-11-24 17:43:23 UTC (rev 9627)
+++ trunk/src/test/unit/org/jboss/seam/test/unit/MailTest.java	2008-11-24 18:28:13 UTC (rev 9628)
@@ -162,7 +162,7 @@
          // JNDI
       }
 
-      assert "true".equals(session.getProperty("mail.smtp.auth"));
+      assert Boolean.parseBoolean(session.getProperty("mail.smtp.auth"));
 
       // TODO Check authentication
 
@@ -337,7 +337,7 @@
          // JNDI
       }
 
-      assert "true".equals(session.getProperty("mail.smtps.auth"));
+      assert Boolean.parseBoolean(session.getProperty("mail.smtps.auth"));
       assert session.getProperty("mail.smtp.auth") == null;
 
       // TODO Check authentication




More information about the seam-commits mailing list