You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by hl...@apache.org on 2011/04/14 00:23:52 UTC
svn commit: r1091955 -
/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/PropertyConduitSourceImpl.java
Author: hlship
Date: Wed Apr 13 22:23:52 2011
New Revision: 1091955
URL: http://svn.apache.org/viewvc?rev=1091955&view=rev
Log:
TAP5-853: Allow lists in sub-expressions, and get rid of the returned boolean from ArrayList.add()
Modified:
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/PropertyConduitSourceImpl.java
Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/PropertyConduitSourceImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/PropertyConduitSourceImpl.java?rev=1091955&r1=1091954&r2=1091955&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/PropertyConduitSourceImpl.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/PropertyConduitSourceImpl.java Wed Apr 13 22:23:52 2011
@@ -873,7 +873,8 @@ public class PropertyConduitSourceImpl i
return boolean.class;
case LIST:
- throw new RuntimeException("Not yet re-implemented.");
+
+ return createPlasticListConstructor(builder, node);
default:
throw unexpectedNodeType(node, TRUE, FALSE, INTEGER, DECIMAL, STRING, DEREF, SAFEDEREF,
@@ -915,7 +916,7 @@ public class PropertyConduitSourceImpl i
});
}
- private void createPlasticListConstructor(InstructionBuilder builder, Tree listNode)
+ private Class createPlasticListConstructor(InstructionBuilder builder, Tree listNode)
{
// First, create an empty instance of ArrayList
@@ -933,8 +934,11 @@ public class PropertyConduitSourceImpl i
if (expressionType.isPrimitive())
builder.boxPrimitive(expressionType.getName());
- builder.invoke(ArrayListMethods.ADD);
+ // Add the value to the array, then pop off the returned boolean
+ builder.invoke(ArrayListMethods.ADD).pop();
}
+
+ return ArrayList.class;
}
private void createListGetter(Tree node, String rootName)