You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by cr...@apache.org on 2007/02/09 21:50:25 UTC
svn commit: r505490 - in /struts/struts2/trunk/core: ./
src/main/java/org/apache/struts2/impl/ src/test/java/org/apache/struts2/impl/
Author: crazybob
Date: Fri Feb 9 12:50:24 2007
New Revision: 505490
URL: http://svn.apache.org/viewvc?view=rev&rev=505490
Log:
Removed dependency from core on the new api. We can bring it back when we're ready.
Removed:
struts/struts2/trunk/core/src/main/java/org/apache/struts2/impl/ActionContextImpl.java
struts/struts2/trunk/core/src/main/java/org/apache/struts2/impl/InterceptorAdapter.java
struts/struts2/trunk/core/src/main/java/org/apache/struts2/impl/MessagesImpl.java
struts/struts2/trunk/core/src/main/java/org/apache/struts2/impl/RequestContextImpl.java
struts/struts2/trunk/core/src/main/java/org/apache/struts2/impl/ResultAdapter.java
struts/struts2/trunk/core/src/main/java/org/apache/struts2/impl/ValueStackAdapter.java
struts/struts2/trunk/core/src/test/java/org/apache/struts2/impl/MessagesTest.java
struts/struts2/trunk/core/src/test/java/org/apache/struts2/impl/RequestContextTest.java
Modified:
struts/struts2/trunk/core/pom.xml
struts/struts2/trunk/core/src/main/java/org/apache/struts2/impl/StrutsActionProxy.java
struts/struts2/trunk/core/src/main/java/org/apache/struts2/impl/StrutsObjectFactory.java
Modified: struts/struts2/trunk/core/pom.xml
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/pom.xml?view=diff&rev=505490&r1=505489&r2=505490
==============================================================================
--- struts/struts2/trunk/core/pom.xml (original)
+++ struts/struts2/trunk/core/pom.xml Fri Feb 9 12:50:24 2007
@@ -255,11 +255,11 @@
<version>2.0.0</version>
</dependency>
- <dependency>
- <groupId>org.apache.struts</groupId>
- <artifactId>struts2-api</artifactId>
- <version>${pom.version}</version>
- </dependency>
+ <!--<dependency>-->
+ <!--<groupId>org.apache.struts</groupId>-->
+ <!--<artifactId>struts2-api</artifactId>-->
+ <!--<version>${pom.version}</version>-->
+ <!--</dependency>-->
<dependency>
<groupId>freemarker</groupId>
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/impl/StrutsActionProxy.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/impl/StrutsActionProxy.java?view=diff&rev=505490&r1=505489&r2=505490
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/impl/StrutsActionProxy.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/impl/StrutsActionProxy.java Fri Feb 9 12:50:24 2007
@@ -22,12 +22,11 @@
package org.apache.struts2.impl;
-import java.util.Map;
-import java.util.concurrent.Callable;
-
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.DefaultActionProxy;
+import java.util.Map;
+
public class StrutsActionProxy extends DefaultActionProxy {
private static final long serialVersionUID = -2434901249671934080L;
@@ -41,11 +40,14 @@
ActionContext previous = ActionContext.getContext();
ActionContext.setContext(invocation.getInvocationContext());
try {
- return RequestContextImpl.callInContext(invocation, new Callable<String>() {
- public String call() throws Exception {
- return invocation.invoke();
- }
- });
+// This is for the new API:
+// return RequestContextImpl.callInContext(invocation, new Callable<String>() {
+// public String call() throws Exception {
+// return invocation.invoke();
+// }
+// });
+
+ return invocation.invoke();
} finally {
if (cleanupContext)
ActionContext.setContext(previous);
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/impl/StrutsObjectFactory.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/impl/StrutsObjectFactory.java?view=diff&rev=505490&r1=505489&r2=505490
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/impl/StrutsObjectFactory.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/impl/StrutsObjectFactory.java Fri Feb 9 12:50:24 2007
@@ -22,9 +22,6 @@
package org.apache.struts2.impl;
-import java.util.HashMap;
-import java.util.Map;
-
import com.opensymphony.xwork2.ObjectFactory;
import com.opensymphony.xwork2.Result;
import com.opensymphony.xwork2.config.ConfigurationException;
@@ -33,6 +30,9 @@
import com.opensymphony.xwork2.interceptor.Interceptor;
import com.opensymphony.xwork2.util.OgnlUtil;
+import java.util.HashMap;
+import java.util.Map;
+
public class StrutsObjectFactory extends ObjectFactory {
public Interceptor buildInterceptor(InterceptorConfig interceptorConfig, Map refParams)
@@ -59,8 +59,9 @@
return interceptor;
}
- if (o instanceof org.apache.struts2.spi.Interceptor)
- return new InterceptorAdapter((org.apache.struts2.spi.Interceptor) o);
+// This is for the new API:
+// if (o instanceof org.apache.struts2.spi.Interceptor)
+// return new InterceptorAdapter((org.apache.struts2.spi.Interceptor) o);
throw new ConfigurationException(
"Class [" + className + "] does not implement Interceptor", interceptorConfig);
@@ -96,8 +97,9 @@
if (result instanceof Result)
return (Result) result;
- if (result instanceof org.apache.struts2.spi.Result)
- return new ResultAdapter((org.apache.struts2.spi.Result) result);
+// This is for the new API:
+// if (result instanceof org.apache.struts2.spi.Result)
+// return new ResultAdapter((org.apache.struts2.spi.Result) result);
throw new ConfigurationException(result.getClass().getName() + " does not implement Result.");
}