tapestry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jkemn...@apache.org
Subject [1/2] tapestry-5 git commit: TAP5-2308: throw an exception if the fragment's clientId is null
Date Tue, 08 Sep 2015 08:53:38 GMT
Repository: tapestry-5
Updated Branches:
  refs/heads/master ff0705574 -> 4a9b17153


TAP5-2308: throw an exception if the fragment's clientId is null


Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/16a7f536
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/16a7f536
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/16a7f536

Branch: refs/heads/master
Commit: 16a7f536eae66c78d8040f8c8104f6794ce285ce
Parents: ff07055
Author: Jochen Kemnade <jochen.kemnade@eddyson.de>
Authored: Tue Sep 8 09:56:58 2015 +0200
Committer: Jochen Kemnade <jochen.kemnade@eddyson.de>
Committed: Tue Sep 8 09:56:58 2015 +0200

----------------------------------------------------------------------
 .../org/apache/tapestry5/corelib/mixins/TriggerFragment.java  | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/16a7f536/tapestry-core/src/main/java/org/apache/tapestry5/corelib/mixins/TriggerFragment.java
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/mixins/TriggerFragment.java
b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/mixins/TriggerFragment.java
index 67b9ed8..2d497b5 100644
--- a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/mixins/TriggerFragment.java
+++ b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/mixins/TriggerFragment.java
@@ -59,9 +59,14 @@ public class TriggerFragment
     @HeartbeatDeferred
     void beginRender()
     {
+        String fragmentId = fragment.getClientId();
+        if (fragmentId == null)
+        {
+            throw new IllegalStateException("The fragment has returned a null client-side
ID");
+        }
         JSONObject spec = new JSONObject(
                 "triggerId", container.getClientId(),
-                "fragmentId", fragment.getClientId());
+                "fragmentId", fragmentId);
 
         if (invert)
         {


Mime
View raw message