struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tschnei...@apache.org
Subject svn commit: r592292 - in /struts/sandbox/trunk/struts2-juel-plugin/src: main/java/com/googlecode/struts2juel/ test/java/com/googlecode/struts2juel/
Date Tue, 06 Nov 2007 05:48:30 GMT
Author: tschneider
Date: Mon Nov  5 21:48:28 2007
New Revision: 592292

URL: http://svn.apache.org/viewvc?rev=592292&view=rev
Log:
added junit for ExpressionFactoryLocator and minor updates

Added:
    struts/sandbox/trunk/struts2-juel-plugin/src/test/java/com/googlecode/struts2juel/ExpressionFactoryLocatorTest.java
Modified:
    struts/sandbox/trunk/struts2-juel-plugin/src/main/java/com/googlecode/struts2juel/CompoundRootELContext.java
    struts/sandbox/trunk/struts2-juel-plugin/src/main/java/com/googlecode/struts2juel/PropertyValueExpression.java
    struts/sandbox/trunk/struts2-juel-plugin/src/test/java/com/googlecode/struts2juel/JuelTest.java

Modified: struts/sandbox/trunk/struts2-juel-plugin/src/main/java/com/googlecode/struts2juel/CompoundRootELContext.java
URL: http://svn.apache.org/viewvc/struts/sandbox/trunk/struts2-juel-plugin/src/main/java/com/googlecode/struts2juel/CompoundRootELContext.java?rev=592292&r1=592291&r2=592292&view=diff
==============================================================================
--- struts/sandbox/trunk/struts2-juel-plugin/src/main/java/com/googlecode/struts2juel/CompoundRootELContext.java
(original)
+++ struts/sandbox/trunk/struts2-juel-plugin/src/main/java/com/googlecode/struts2juel/CompoundRootELContext.java
Mon Nov  5 21:48:28 2007
@@ -20,7 +20,7 @@
     private VariableMapper variableMapper;
     private FunctionMapper functionMapper = new NullFunctionMapper();
 
-    private static final ELResolver DEFAULT_RESOLVER_READ_ONLY = new CompositeELResolver()
{
+    private static final ELResolver DEFAULT_RESOLVER_READ_WRITE = new CompositeELResolver()
{
 		{
 			add(new ArrayELResolver(false));
 			add(new ListELResolver(false));
@@ -41,7 +41,7 @@
 
 	@Override
 	public ELResolver getELResolver() {
-		return DEFAULT_RESOLVER_READ_ONLY;
+		return DEFAULT_RESOLVER_READ_WRITE;
 	}
 
 	@Override

Modified: struts/sandbox/trunk/struts2-juel-plugin/src/main/java/com/googlecode/struts2juel/PropertyValueExpression.java
URL: http://svn.apache.org/viewvc/struts/sandbox/trunk/struts2-juel-plugin/src/main/java/com/googlecode/struts2juel/PropertyValueExpression.java?rev=592292&r1=592291&r2=592292&view=diff
==============================================================================
--- struts/sandbox/trunk/struts2-juel-plugin/src/main/java/com/googlecode/struts2juel/PropertyValueExpression.java
(original)
+++ struts/sandbox/trunk/struts2-juel-plugin/src/main/java/com/googlecode/struts2juel/PropertyValueExpression.java
Mon Nov  5 21:48:28 2007
@@ -60,7 +60,7 @@
 
 	@Override
 	public boolean isReadOnly(ELContext arg0) {
-		return PropertyUtils.isWriteable(object, property);
+		return !PropertyUtils.isWriteable(object, property);
 	}
 
 	@Override

Added: struts/sandbox/trunk/struts2-juel-plugin/src/test/java/com/googlecode/struts2juel/ExpressionFactoryLocatorTest.java
URL: http://svn.apache.org/viewvc/struts/sandbox/trunk/struts2-juel-plugin/src/test/java/com/googlecode/struts2juel/ExpressionFactoryLocatorTest.java?rev=592292&view=auto
==============================================================================
--- struts/sandbox/trunk/struts2-juel-plugin/src/test/java/com/googlecode/struts2juel/ExpressionFactoryLocatorTest.java
(added)
+++ struts/sandbox/trunk/struts2-juel-plugin/src/test/java/com/googlecode/struts2juel/ExpressionFactoryLocatorTest.java
Mon Nov  5 21:48:28 2007
@@ -0,0 +1,13 @@
+package com.googlecode.struts2juel;
+
+import javax.el.ExpressionFactory;
+
+import junit.framework.TestCase;
+
+public class ExpressionFactoryLocatorTest extends TestCase {
+	public void testJuelLoad() {
+		ExpressionFactory factory = ExpressionFactoryLocator
+				.locateExpressFactory();
+		assertNotNull(factory);
+	}
+}

Modified: struts/sandbox/trunk/struts2-juel-plugin/src/test/java/com/googlecode/struts2juel/JuelTest.java
URL: http://svn.apache.org/viewvc/struts/sandbox/trunk/struts2-juel-plugin/src/test/java/com/googlecode/struts2juel/JuelTest.java?rev=592292&r1=592291&r2=592292&view=diff
==============================================================================
--- struts/sandbox/trunk/struts2-juel-plugin/src/test/java/com/googlecode/struts2juel/JuelTest.java
(original)
+++ struts/sandbox/trunk/struts2-juel-plugin/src/test/java/com/googlecode/struts2juel/JuelTest.java
Mon Nov  5 21:48:28 2007
@@ -9,6 +9,7 @@
 import com.opensymphony.xwork2.util.CompoundRoot;
 
 public class JuelTest extends TestCase {
+	
     public void testBasicFind() throws IllegalAccessException,
         InvocationTargetException, NoSuchMethodException {
         ExpressionFactory factory = new de.odysseus.el.ExpressionFactoryImpl();



Mime
View raw message