Author: joshcanfield
Date: Thu Jun 23 03:38:38 2011
New Revision: 1138727
URL: http://svn.apache.org/viewvc?rev=1138727&view=rev
Log:
TAP5-1554: Added to "create accessors for generic fields" to ensure that
method.getGenericInfo returned a valid object (forced parse of the
genericSignature, at least in the current implementation)
Changed PlasticClassImpl to use the proper signature when creating the setter.
Modified:
tapestry/tapestry5/trunk/plastic/src/main/java/org/apache/tapestry5/internal/plastic/PlasticClassImpl.java
tapestry/tapestry5/trunk/plastic/src/test/groovy/org/apache/tapestry5/plastic/FieldPropertyMethodCreation.groovy
Modified:
tapestry/tapestry5/trunk/plastic/src/main/java/org/apache/tapestry5/internal/plastic/PlasticClassImpl.java
URL:
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/plastic/src/main/java/org/apache/tapestry5/internal/plastic/PlasticClassImpl.java?rev=1138727&r1=1138726&r2=1138727&view=diff
==============================================================================
---
tapestry/tapestry5/trunk/plastic/src/main/java/org/apache/tapestry5/internal/plastic/PlasticClassImpl.java
(original)
+++
tapestry/tapestry5/trunk/plastic/src/main/java/org/apache/tapestry5/internal/plastic/PlasticClassImpl.java
Thu Jun 23 03:38:38 2011
@@ -787,7 +787,7 @@ public class PlasticClassImpl extends Lo
String signature = node.signature == null ? null : "(" +
node.signature + ")V";
introduceAccessorMethod("void", "set" + capitalized, new
String[]
- { getTypeName() }, node.signature, new
InstructionBuilderCallback()
+ { getTypeName() }, signature, new InstructionBuilderCallback()
{
public void doBuild(InstructionBuilder builder)
{
Modified:
tapestry/tapestry5/trunk/plastic/src/test/groovy/org/apache/tapestry5/plastic/FieldPropertyMethodCreation.groovy
URL:
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/plastic/src/test/groovy/org/apache/tapestry5/plastic/FieldPropertyMethodCreation.groovy?rev=1138727&r1=1138726&r2=1138727&view=diff
==============================================================================
---
tapestry/tapestry5/trunk/plastic/src/test/groovy/org/apache/tapestry5/plastic/FieldPropertyMethodCreation.groovy
(original)
+++
tapestry/tapestry5/trunk/plastic/src/test/groovy/org/apache/tapestry5/plastic/FieldPropertyMethodCreation.groovy
Thu Jun 23 03:38:38 2011
@@ -82,8 +82,13 @@ class FieldPropertyMethodCreation extend
assert o.ref == ref
assert o.refValue == "Plastic"
- o.class.getMethod("getRef").signature ==
"()Ljava/util/concurrent/atomic/AtomicReference<Ljava/lang/String;>;"
- o.class.getMethod("setRef", AtomicReference.class).signature ==
"Ljava/util/concurrent/atomic/AtomicReference<Ljava/lang/String;>;"
+ def get = o.class.getMethod("getRef")
+ get.signature ==
"()Ljava/util/concurrent/atomic/AtomicReference<Ljava/lang/String;>;"
+ get.genericInfo != null
+
+ def set = o.class.getMethod("setRef", AtomicReference.class)
+ set.signature ==
"(Ljava/util/concurrent/atomic/AtomicReference<Ljava/lang/String;>;)V"
+ set.genericInfo != null
}
def "create getter that already exists"() {