myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lof...@apache.org
Subject svn commit: r924227 - in /myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago: context/ClientProperties.java util/ComponentUtils.java util/MessageFactory.java
Date Wed, 17 Mar 2010 11:23:50 GMT
Author: lofwyr
Date: Wed Mar 17 11:23:50 2010
New Revision: 924227

URL: http://svn.apache.org/viewvc?rev=924227&view=rev
Log:
code style

Modified:
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/context/ClientProperties.java
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/util/ComponentUtils.java
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/util/MessageFactory.java

Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/context/ClientProperties.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/context/ClientProperties.java?rev=924227&r1=924226&r2=924227&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/context/ClientProperties.java
(original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/context/ClientProperties.java
Wed Mar 17 11:23:50 2010
@@ -127,7 +127,8 @@ public class ClientProperties implements
 
   /**
    * @deprecated since 1.5. Please use 
-   * {@link org.apache.myfaces.tobago.util.VariableResolverUtils#resolveClientProperties(javax.faces.context.FacesContext)}

+   * {@link 
+   * org.apache.myfaces.tobago.util.VariableResolverUtils#resolveClientProperties(javax.faces.context.FacesContext)}

    */
   @Deprecated
   public static ClientProperties getInstance(UIViewRoot viewRoot) {
@@ -136,7 +137,8 @@ public class ClientProperties implements
 
   /**
    * @deprecated since 1.5. Please use 
-   * {@link org.apache.myfaces.tobago.util.VariableResolverUtils#resolveClientProperties(javax.faces.context.FacesContext)}

+   * {@link 
+   * org.apache.myfaces.tobago.util.VariableResolverUtils#resolveClientProperties(javax.faces.context.FacesContext)}

    */
   @Deprecated
   public static ClientProperties getInstance(FacesContext facesContext) {

Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/util/ComponentUtils.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/util/ComponentUtils.java?rev=924227&r1=924226&r2=924227&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/util/ComponentUtils.java
(original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/util/ComponentUtils.java
Wed Mar 17 11:23:50 2010
@@ -425,7 +425,7 @@ public class ComponentUtils {
       return null;
     }
 
-    Map<String, Object> requestMap = (Map<String, Object>)facesContext.getExternalContext().getRequestMap();
+    Map<String, Object> requestMap = (Map<String, Object>) facesContext.getExternalContext().getRequestMap();
     StringBuilder key = new StringBuilder(RENDER_KEY_PREFIX);
     key.append(rendererType);
     RendererBase renderer = (RendererBase) requestMap.get(key.toString());
@@ -501,7 +501,7 @@ public class ComponentUtils {
   }
 
   public static UIOutput getFirstNonGraphicChild(UIComponent component) {
-    for (UIComponent child : (List<UIComponent>)component.getChildren()) {
+    for (UIComponent child : (List<UIComponent>) component.getChildren()) {
       if (child instanceof UIOutput) {
         return (UIOutput) child;
       }

Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/util/MessageFactory.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/util/MessageFactory.java?rev=924227&r1=924226&r2=924227&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/util/MessageFactory.java
(original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/util/MessageFactory.java
Wed Mar 17 11:23:50 2010
@@ -28,9 +28,13 @@ import java.util.Locale;
 import java.util.Map;
 import java.util.ResourceBundle;
 
-public class MessageFactory {
+public final class MessageFactory {
 
-  public static Map<Locale, ResourceBundle> facesMessagesMap = new HashMap<Locale,
ResourceBundle>();
+  public MessageFactory() {
+    // utils class
+  }
+
+  private static final Map<Locale, ResourceBundle> FACES_MESSAGES_MAP = new HashMap<Locale,
ResourceBundle>();
 
   public static FacesMessage createFacesMessage(
       FacesContext facesContext, String key, FacesMessage.Severity severity, Object[] args)
{
@@ -92,11 +96,11 @@ public class MessageFactory {
   }
 
   public static ResourceBundle getFacesMessages(Locale locale) {
-    ResourceBundle facesMessages = facesMessagesMap.get(locale);
+    ResourceBundle facesMessages = FACES_MESSAGES_MAP.get(locale);
     if (facesMessages == null) {
       facesMessages
           = ResourceBundle.getBundle(FacesMessage.FACES_MESSAGES, locale);
-      facesMessagesMap.put(locale, facesMessages);
+      FACES_MESSAGES_MAP.put(locale, facesMessages);
     }
     return facesMessages;
   }



Mime
View raw message