myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gpetra...@apache.org
Subject svn commit: r958594 - in /myfaces/extensions/cdi/trunk/jse-modules/message-module: api/src/main/java/org/apache/myfaces/extensions/cdi/message/api/ impl/src/main/java/org/apache/myfaces/extensions/cdi/message/impl/ impl/src/main/java/org/apache/myfaces...
Date Mon, 28 Jun 2010 14:45:01 GMT
Author: gpetracek
Date: Mon Jun 28 14:45:01 2010
New Revision: 958594

URL: http://svn.apache.org/viewvc?rev=958594&view=rev
Log:
EXTCDI-24 cleanup

Modified:
    myfaces/extensions/cdi/trunk/jse-modules/message-module/api/src/main/java/org/apache/myfaces/extensions/cdi/message/api/AbstractMessageHandler.java
    myfaces/extensions/cdi/trunk/jse-modules/message-module/impl/src/main/java/org/apache/myfaces/extensions/cdi/message/impl/DefaultFormatterFactory.java
    myfaces/extensions/cdi/trunk/jse-modules/message-module/impl/src/main/java/org/apache/myfaces/extensions/cdi/message/impl/DefaultMessageContextConfig.java
    myfaces/extensions/cdi/trunk/jse-modules/message-module/impl/src/main/java/org/apache/myfaces/extensions/cdi/message/impl/ELAwareMessageInterpolator.java
    myfaces/extensions/cdi/trunk/jse-modules/message-module/impl/src/main/java/org/apache/myfaces/extensions/cdi/message/impl/spi/ELProvider.java

Modified: myfaces/extensions/cdi/trunk/jse-modules/message-module/api/src/main/java/org/apache/myfaces/extensions/cdi/message/api/AbstractMessageHandler.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/jse-modules/message-module/api/src/main/java/org/apache/myfaces/extensions/cdi/message/api/AbstractMessageHandler.java?rev=958594&r1=958593&r2=958594&view=diff
==============================================================================
--- myfaces/extensions/cdi/trunk/jse-modules/message-module/api/src/main/java/org/apache/myfaces/extensions/cdi/message/api/AbstractMessageHandler.java
(original)
+++ myfaces/extensions/cdi/trunk/jse-modules/message-module/api/src/main/java/org/apache/myfaces/extensions/cdi/message/api/AbstractMessageHandler.java
Mon Jun 28 14:45:01 2010
@@ -40,7 +40,7 @@ public abstract class AbstractMessageHan
 
     protected abstract void processMessage(MessageContext messageContext, Message message);
 
-    public void addMessageFilter(MessageFilter... messageFilters)
+    public synchronized void addMessageFilter(MessageFilter... messageFilters)
     {
         if (this.messageFilters == null)
         {
@@ -49,12 +49,12 @@ public abstract class AbstractMessageHan
         this.messageFilters.addAll(Arrays.asList(messageFilters));
     }
 
-    public Set<MessageFilter> getMessageFilters()
+    public synchronized Set<MessageFilter> getMessageFilters()
     {
         return Collections.unmodifiableSet(this.messageFilters);
     }
 
-    private boolean isMessageAllowed(MessageContext messageContext, Message message)
+    private synchronized boolean isMessageAllowed(MessageContext messageContext, Message
message)
     {
         for (MessageFilter messageFilter : this.messageFilters)
         {

Modified: myfaces/extensions/cdi/trunk/jse-modules/message-module/impl/src/main/java/org/apache/myfaces/extensions/cdi/message/impl/DefaultFormatterFactory.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/jse-modules/message-module/impl/src/main/java/org/apache/myfaces/extensions/cdi/message/impl/DefaultFormatterFactory.java?rev=958594&r1=958593&r2=958594&view=diff
==============================================================================
--- myfaces/extensions/cdi/trunk/jse-modules/message-module/impl/src/main/java/org/apache/myfaces/extensions/cdi/message/impl/DefaultFormatterFactory.java
(original)
+++ myfaces/extensions/cdi/trunk/jse-modules/message-module/impl/src/main/java/org/apache/myfaces/extensions/cdi/message/impl/DefaultFormatterFactory.java
Mon Jun 28 14:45:01 2010
@@ -56,7 +56,7 @@ public class DefaultFormatterFactory imp
         return this;
     }
 
-    public List<Formatter> reset()
+    public synchronized List<Formatter> reset()
     {
         List<Formatter> oldFormatters = Collections.unmodifiableList(this.formatters);
         this.formatters.clear();
@@ -77,7 +77,7 @@ public class DefaultFormatterFactory imp
                 this.formatterCache = new ConcurrentHashMap<Class<?>, Formatter>();
             }
 
-            Formatter found = findFormatterFor(type, this.formatters);
+            Formatter found = findFormatterFor(type);
 
             if (found == null)
             {
@@ -111,9 +111,9 @@ public class DefaultFormatterFactory imp
         return this.formatterConfigs.get(createKey(type, locale));
     }
 
-    private Formatter findFormatterFor(Class<?> type, Iterable<Formatter> formatters)
+    private synchronized Formatter findFormatterFor(Class<?> type)
     {
-        for (Formatter formatter : formatters)
+        for (Formatter formatter : this.formatters)
         {
             if (formatter.isResponsibleFor(type))
             {

Modified: myfaces/extensions/cdi/trunk/jse-modules/message-module/impl/src/main/java/org/apache/myfaces/extensions/cdi/message/impl/DefaultMessageContextConfig.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/jse-modules/message-module/impl/src/main/java/org/apache/myfaces/extensions/cdi/message/impl/DefaultMessageContextConfig.java?rev=958594&r1=958593&r2=958594&view=diff
==============================================================================
--- myfaces/extensions/cdi/trunk/jse-modules/message-module/impl/src/main/java/org/apache/myfaces/extensions/cdi/message/impl/DefaultMessageContextConfig.java
(original)
+++ myfaces/extensions/cdi/trunk/jse-modules/message-module/impl/src/main/java/org/apache/myfaces/extensions/cdi/message/impl/DefaultMessageContextConfig.java
Mon Jun 28 14:45:01 2010
@@ -247,7 +247,7 @@ class DefaultMessageContextConfig implem
         return this.localeResolver;
     }
 
-    public MessageHandler getMessageHandler()
+    public synchronized MessageHandler getMessageHandler()
     {
         return new DefaultCompositeMessageHandler(this.messageHandlers);
     }

Modified: myfaces/extensions/cdi/trunk/jse-modules/message-module/impl/src/main/java/org/apache/myfaces/extensions/cdi/message/impl/ELAwareMessageInterpolator.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/jse-modules/message-module/impl/src/main/java/org/apache/myfaces/extensions/cdi/message/impl/ELAwareMessageInterpolator.java?rev=958594&r1=958593&r2=958594&view=diff
==============================================================================
--- myfaces/extensions/cdi/trunk/jse-modules/message-module/impl/src/main/java/org/apache/myfaces/extensions/cdi/message/impl/ELAwareMessageInterpolator.java
(original)
+++ myfaces/extensions/cdi/trunk/jse-modules/message-module/impl/src/main/java/org/apache/myfaces/extensions/cdi/message/impl/ELAwareMessageInterpolator.java
Mon Jun 28 14:45:01 2010
@@ -75,7 +75,7 @@ public class ELAwareMessageInterpolator 
     }
 
     //TODO add warning for unused arguments,...
-    private String interpolateNamedArguments(MessageContext messageContext,
+    private synchronized String interpolateNamedArguments(MessageContext messageContext,
                                              String messageDescriptor,
                                              List<NamedArgument> namedArguments)
     {
@@ -108,6 +108,7 @@ public class ELAwareMessageInterpolator 
             else
             {
                 resolvedArgumentValue = '{' + expression + '}';
+                //resolvedArgumentValue = ""; //TODO can we use it as alternative?
             }
 
             matcher.appendReplacement(buffer, resolvedArgumentValue);

Modified: myfaces/extensions/cdi/trunk/jse-modules/message-module/impl/src/main/java/org/apache/myfaces/extensions/cdi/message/impl/spi/ELProvider.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/jse-modules/message-module/impl/src/main/java/org/apache/myfaces/extensions/cdi/message/impl/spi/ELProvider.java?rev=958594&r1=958593&r2=958594&view=diff
==============================================================================
--- myfaces/extensions/cdi/trunk/jse-modules/message-module/impl/src/main/java/org/apache/myfaces/extensions/cdi/message/impl/spi/ELProvider.java
(original)
+++ myfaces/extensions/cdi/trunk/jse-modules/message-module/impl/src/main/java/org/apache/myfaces/extensions/cdi/message/impl/spi/ELProvider.java
Mon Jun 28 14:45:01 2010
@@ -20,11 +20,12 @@ package org.apache.myfaces.extensions.cd
 
 import javax.el.ELResolver;
 import javax.el.ExpressionFactory;
+import java.io.Serializable;
 
 /**
  * @author Gerhard Petracek
  */
-public interface ELProvider
+public interface ELProvider extends Serializable
 {
     ExpressionFactory createExpressionFactory();
 



Mime
View raw message