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/10/24 18:34:28 UTC
svn commit: r1188208 - in
/tapestry/tapestry5/trunk/plastic/src/main/java/org/apache/tapestry5/internal/plastic:
PlasticClassImpl.java PlasticMethodImpl.java
Author: hlship
Date: Mon Oct 24 16:34:27 2011
New Revision: 1188208
URL: http://svn.apache.org/viewvc?rev=1188208&view=rev
Log:
Replace some TODOs with actual runtime assertions
Modified:
tapestry/tapestry5/trunk/plastic/src/main/java/org/apache/tapestry5/internal/plastic/PlasticClassImpl.java
tapestry/tapestry5/trunk/plastic/src/main/java/org/apache/tapestry5/internal/plastic/PlasticMethodImpl.java
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=1188208&r1=1188207&r2=1188208&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 Mon Oct 24 16:34:27 2011
@@ -110,7 +110,6 @@ public class PlasticClassImpl extends Lo
* have method advice.
*/
final Set<PlasticMethodImpl> advisedMethods = PlasticInternalUtils.newSet();
- ;
final NameCache nameCache = new NameCache();
@@ -169,7 +168,7 @@ public class PlasticClassImpl extends Lo
// Set of methods that need to contribute to the shim and gain access to it
- final Set<PlasticMethodImpl> shimMethods = PlasticInternalUtils.newSet();
+ final Set<PlasticMethodImpl> shimMethods = PlasticInternalUtils.newSet();
/**
* @param classNode
Modified: tapestry/tapestry5/trunk/plastic/src/main/java/org/apache/tapestry5/internal/plastic/PlasticMethodImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/plastic/src/main/java/org/apache/tapestry5/internal/plastic/PlasticMethodImpl.java?rev=1188208&r1=1188207&r2=1188208&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/plastic/src/main/java/org/apache/tapestry5/internal/plastic/PlasticMethodImpl.java (original)
+++ tapestry/tapestry5/trunk/plastic/src/main/java/org/apache/tapestry5/internal/plastic/PlasticMethodImpl.java Mon Oct 24 16:34:27 2011
@@ -160,8 +160,7 @@ class PlasticMethodImpl extends PlasticM
plasticClass.check();
assert field != null;
-
- // TODO: Ensure that the field is a field of this class.
+ assert field.getPlasticClass() == plasticClass;
// TODO: Better handling error case where delegating to a primitive or object array.
@@ -189,8 +188,9 @@ class PlasticMethodImpl extends PlasticM
plasticClass.check();
assert delegateProvidingMethod != null;
+ assert delegateProvidingMethod.getPlasticClass() == plasticClass;
- // TODO: ensure same class, ensure not primitive/array type
+ // TODO: ensure not primitive/array type
final MethodDescription providerDescriptor = delegateProvidingMethod.getDescription();
final String delegateType = providerDescriptor.returnType;