[seam-commits] Seam SVN: r10697 - in modules/trunk/international/src: test/java/org/jboss/seam/international and 1 other directory.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Wed Apr 29 01:56:28 EDT 2009


Author: dan.j.allen
Date: 2009-04-29 01:56:28 -0400 (Wed, 29 Apr 2009)
New Revision: 10697

Modified:
   modules/trunk/international/src/main/java/org/jboss/seam/international/Interpolator.java
   modules/trunk/international/src/main/java/org/jboss/seam/international/LocaleProducer.java
   modules/trunk/international/src/main/java/org/jboss/seam/international/MessagesProducer.java
   modules/trunk/international/src/main/java/org/jboss/seam/international/ResourceLoader.java
   modules/trunk/international/src/main/java/org/jboss/seam/international/StatusMessages.java
   modules/trunk/international/src/test/java/org/jboss/seam/international/StatusMessagesTest.java
Log:
remove unnecessary @Dependent scope declaration
disable broken injections
refactor test


Modified: modules/trunk/international/src/main/java/org/jboss/seam/international/Interpolator.java
===================================================================
--- modules/trunk/international/src/main/java/org/jboss/seam/international/Interpolator.java	2009-04-29 05:55:12 UTC (rev 10696)
+++ modules/trunk/international/src/main/java/org/jboss/seam/international/Interpolator.java	2009-04-29 05:56:28 UTC (rev 10697)
@@ -6,7 +6,6 @@
 import java.util.Locale;
 import java.util.StringTokenizer;
 
-import javax.context.Dependent;
 import javax.inject.Current;
 import org.jboss.webbeans.log.LogProvider;
 import org.jboss.webbeans.log.Logging;
@@ -16,9 +15,7 @@
  * 
  * @author Gavin King
  */
-public
- at Dependent
-class Interpolator implements Serializable
+public class Interpolator implements Serializable
 {
    private static final LogProvider log = Logging.getLogProvider(Interpolator.class);
 

Modified: modules/trunk/international/src/main/java/org/jboss/seam/international/LocaleProducer.java
===================================================================
--- modules/trunk/international/src/main/java/org/jboss/seam/international/LocaleProducer.java	2009-04-29 05:55:12 UTC (rev 10696)
+++ modules/trunk/international/src/main/java/org/jboss/seam/international/LocaleProducer.java	2009-04-29 05:56:28 UTC (rev 10697)
@@ -1,6 +1,6 @@
 package org.jboss.seam.international;
 
-import javax.context.Dependent;
+import javax.annotation.Named;
 import javax.inject.Produces;
 
 /**
@@ -10,14 +10,13 @@
  * 
  * @author Gavin King
  */
-public
- at Dependent
-class LocaleProducer
+public class LocaleProducer
 {
    public
    @Produces
+   @Named("org.jboss.seam.international.locale")
    java.util.Locale getLocale()
    {
       return java.util.Locale.getDefault();
    }
-}
\ No newline at end of file
+}

Modified: modules/trunk/international/src/main/java/org/jboss/seam/international/MessagesProducer.java
===================================================================
--- modules/trunk/international/src/main/java/org/jboss/seam/international/MessagesProducer.java	2009-04-29 05:55:12 UTC (rev 10696)
+++ modules/trunk/international/src/main/java/org/jboss/seam/international/MessagesProducer.java	2009-04-29 05:56:28 UTC (rev 10697)
@@ -27,7 +27,8 @@
 {
    //TODO: now we have ELResolver, it doesn't *have* to be a Map...
    
-   @Current ResourceBundle bundle;
+   //@Current
+   ResourceBundle bundle;
       
    protected Map createMap() 
    {  

Modified: modules/trunk/international/src/main/java/org/jboss/seam/international/ResourceLoader.java
===================================================================
--- modules/trunk/international/src/main/java/org/jboss/seam/international/ResourceLoader.java	2009-04-29 05:55:12 UTC (rev 10696)
+++ modules/trunk/international/src/main/java/org/jboss/seam/international/ResourceLoader.java	2009-04-29 05:56:28 UTC (rev 10697)
@@ -5,7 +5,6 @@
 import java.net.URL;
 import java.util.Locale;
 import java.util.MissingResourceException;
-import javax.context.Dependent;
 import javax.inject.Current;
 import javax.inject.manager.Manager;
 import org.jboss.webbeans.log.LogProvider;
@@ -16,14 +15,14 @@
  * 
  * @author Gavin King
  */
- at Dependent
 public class ResourceLoader
 {
    private static final LogProvider log = Logging.getLogProvider(ResourceLoader.class);
 
    private String[] bundleNames = { "messages" };
 
-   @Current Manager manager;
+   //@Current
+   Manager manager;
    
    /**
     * The configurable list of delegate resource bundle names

Modified: modules/trunk/international/src/main/java/org/jboss/seam/international/StatusMessages.java
===================================================================
--- modules/trunk/international/src/main/java/org/jboss/seam/international/StatusMessages.java	2009-04-29 05:55:12 UTC (rev 10696)
+++ modules/trunk/international/src/main/java/org/jboss/seam/international/StatusMessages.java	2009-04-29 05:56:28 UTC (rev 10697)
@@ -50,7 +50,8 @@
  *
  * <p>Seam will interpolate value expressions and positional parameters in
  * message templates. Interpolation is deferred until just before the next view
- * in the conversation is rendered.</p>
+ * in the conversation is rendered, allowing value expressions to resolve to
+ * the final state of the action as with the rest of the view.</p>
  * 
  * @author Pete Muir
  * @author Dan Allen

Modified: modules/trunk/international/src/test/java/org/jboss/seam/international/StatusMessagesTest.java
===================================================================
--- modules/trunk/international/src/test/java/org/jboss/seam/international/StatusMessagesTest.java	2009-04-29 05:55:12 UTC (rev 10696)
+++ modules/trunk/international/src/test/java/org/jboss/seam/international/StatusMessagesTest.java	2009-04-29 05:56:28 UTC (rev 10697)
@@ -26,8 +26,7 @@
    public void beforeMethod()
    {
       super.beforeMethod();
-      ConversationContext.instance().setBeanStore(new ConcurrentHashMapBeanStore());
-      ConversationContext.instance().setActive(true);
+      activateConversationContext();
    }
 
    @Test
@@ -43,6 +42,12 @@
 
    // TODO test loading messages from resource bundle when resource bundle is ready
 
+   private void activateConversationContext()
+   {
+      ConversationContext.instance().setBeanStore(new ConcurrentHashMapBeanStore());
+      ConversationContext.instance().setActive(true);
+   }
+
    private StatusMessages getStatusMessagesInstance()
    {
       return getCurrentManager().getInstanceByType(StatusMessages.class);




More information about the seam-commits mailing list