struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgie...@apache.org
Subject svn commit: r523619 - in /struts/struts2/branches/STRUTS_2_0_X/core: pom.xml src/main/java/org/apache/struts2/components/I18n.java src/main/java/org/apache/struts2/dispatcher/Dispatcher.java
Date Thu, 29 Mar 2007 08:31:44 GMT
Author: rgielen
Date: Thu Mar 29 01:31:43 2007
New Revision: 523619

URL: http://svn.apache.org/viewvc?view=rev&rev=523619
Log:
WW-1856:
Use changed TextProviderFactory (for upcoming XW 2.0.2) to fix issue with broken i18n tag
/ missing thread safety for TPF

See also:
http://jira.opensymphony.com/browse/XW-487
http://jira.opensymphony.com/browse/XW-476

Modified:
    struts/struts2/branches/STRUTS_2_0_X/core/pom.xml
    struts/struts2/branches/STRUTS_2_0_X/core/src/main/java/org/apache/struts2/components/I18n.java
    struts/struts2/branches/STRUTS_2_0_X/core/src/main/java/org/apache/struts2/dispatcher/Dispatcher.java

Modified: struts/struts2/branches/STRUTS_2_0_X/core/pom.xml
URL: http://svn.apache.org/viewvc/struts/struts2/branches/STRUTS_2_0_X/core/pom.xml?view=diff&rev=523619&r1=523618&r2=523619
==============================================================================
--- struts/struts2/branches/STRUTS_2_0_X/core/pom.xml (original)
+++ struts/struts2/branches/STRUTS_2_0_X/core/pom.xml Thu Mar 29 01:31:43 2007
@@ -252,7 +252,7 @@
         <dependency>
             <groupId>opensymphony</groupId>
             <artifactId>xwork</artifactId>
-            <version>2.0.1</version>
+            <version>2.0.2-SNAPSHOT</version>
         </dependency>
 
         <dependency>

Modified: struts/struts2/branches/STRUTS_2_0_X/core/src/main/java/org/apache/struts2/components/I18n.java
URL: http://svn.apache.org/viewvc/struts/struts2/branches/STRUTS_2_0_X/core/src/main/java/org/apache/struts2/components/I18n.java?view=diff&rev=523619&r1=523618&r2=523619
==============================================================================
--- struts/struts2/branches/STRUTS_2_0_X/core/src/main/java/org/apache/struts2/components/I18n.java
(original)
+++ struts/struts2/branches/STRUTS_2_0_X/core/src/main/java/org/apache/struts2/components/I18n.java
Thu Mar 29 01:31:43 2007
@@ -20,20 +20,19 @@
  */
 package org.apache.struts2.components;
 
-import java.io.Writer;
-import java.util.Locale;
-import java.util.ResourceBundle;
-
-import org.apache.struts2.views.annotations.StrutsTag;
-import org.apache.struts2.views.annotations.StrutsTagAttribute;
-import org.apache.struts2.StrutsException;
-
 import com.opensymphony.xwork2.ActionContext;
 import com.opensymphony.xwork2.LocaleProvider;
-import com.opensymphony.xwork2.TextProviderSupport;
 import com.opensymphony.xwork2.TextProviderFactory;
 import com.opensymphony.xwork2.util.LocalizedTextUtil;
 import com.opensymphony.xwork2.util.ValueStack;
+import org.apache.struts2.StrutsException;
+import org.apache.struts2.dispatcher.Dispatcher;
+import org.apache.struts2.views.annotations.StrutsTag;
+import org.apache.struts2.views.annotations.StrutsTagAttribute;
+
+import java.io.Writer;
+import java.util.Locale;
+import java.util.ResourceBundle;
 
 /**
  * <!-- START SNIPPET: javadoc -->
@@ -103,7 +102,9 @@
 
             if (bundle != null) {
                 final Locale locale = (Locale) getStack().getContext().get(ActionContext.LOCALE);
-                getStack().push(TextProviderFactory.getInstance(bundle, new LocaleProvider()
{
+                TextProviderFactory tpf = new TextProviderFactory();
+                Dispatcher.getInstance().getContainer().inject(tpf);
+                getStack().push(tpf.createInstance(bundle, new LocaleProvider() {
                      public Locale getLocale() {
                          return locale;
                      }

Modified: struts/struts2/branches/STRUTS_2_0_X/core/src/main/java/org/apache/struts2/dispatcher/Dispatcher.java
URL: http://svn.apache.org/viewvc/struts/struts2/branches/STRUTS_2_0_X/core/src/main/java/org/apache/struts2/dispatcher/Dispatcher.java?view=diff&rev=523619&r1=523618&r2=523619
==============================================================================
--- struts/struts2/branches/STRUTS_2_0_X/core/src/main/java/org/apache/struts2/dispatcher/Dispatcher.java
(original)
+++ struts/struts2/branches/STRUTS_2_0_X/core/src/main/java/org/apache/struts2/dispatcher/Dispatcher.java
Thu Mar 29 01:31:43 2007
@@ -401,9 +401,6 @@
         ObjectTypeDeterminer objectTypeDeterminer = container.getInstance(ObjectTypeDeterminer.class);
         ObjectTypeDeterminerFactory.setInstance(objectTypeDeterminer);
 
-        TextProvider textProvider = container.getInstance(TextProvider.class);
-        TextProviderFactory.setInstance(textProvider);
-        
         return container;
     }
 



Mime
View raw message