You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2014/07/18 18:23:02 UTC

svn commit: r1611697 - in /myfaces/tobago/branches/tobago-3.0.x: ./ tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/info/ActivityList.java

Author: lofwyr
Date: Fri Jul 18 16:23:02 2014
New Revision: 1611697

URL: http://svn.apache.org/r1611697
Log:
Merged from trunk
if the session lives longer than the application scope (e.g. restart of the application with session persistence) here happens an NullPointerException [from revision 1611571]

Modified:
    myfaces/tobago/branches/tobago-3.0.x/   (props changed)
    myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/info/ActivityList.java

Propchange: myfaces/tobago/branches/tobago-3.0.x/
------------------------------------------------------------------------------
  Merged /myfaces/tobago/trunk:r1611571

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/info/ActivityList.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/info/ActivityList.java?rev=1611697&r1=1611696&r2=1611697&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/info/ActivityList.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/info/ActivityList.java Fri Jul 18 16:23:02 2014
@@ -59,10 +59,20 @@ public class ActivityList implements Ser
   }
 
   public void executeJsfRequest(final String sessionId) {
-    data.get(sessionId).executeJsfRequest();
+    final Activity activity = data.get(sessionId);
+    if (activity != null) {
+      activity.executeJsfRequest();
+    } else {
+      LOG.error("Ignoring sessionId='{}'", sessionId);
+    }
   }
 
   public void executeAjaxRequest(final String sessionId) {
-    data.get(sessionId).executeAjaxRequest();
+    final Activity activity = data.get(sessionId);
+    if (activity != null) {
+      activity.executeAjaxRequest();
+    } else {
+      LOG.error("Ignoring sessionId='{}'", sessionId);
+    }
   }
 }