cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vgritse...@apache.org
Subject svn commit: r585756 - /cocoon/trunk/blocks/cocoon-flowscript/cocoon-flowscript-impl/src/main/java/org/apache/cocoon/components/flow/javascript/fom/FOM_WebContinuation.java
Date Wed, 17 Oct 2007 23:34:19 GMT
Author: vgritsenko
Date: Wed Oct 17 16:34:18 2007
New Revision: 585756

URL: http://svn.apache.org/viewvc?rev=585756&view=rev
Log:
cleanup

Modified:
    cocoon/trunk/blocks/cocoon-flowscript/cocoon-flowscript-impl/src/main/java/org/apache/cocoon/components/flow/javascript/fom/FOM_WebContinuation.java

Modified: cocoon/trunk/blocks/cocoon-flowscript/cocoon-flowscript-impl/src/main/java/org/apache/cocoon/components/flow/javascript/fom/FOM_WebContinuation.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-flowscript/cocoon-flowscript-impl/src/main/java/org/apache/cocoon/components/flow/javascript/fom/FOM_WebContinuation.java?rev=585756&r1=585755&r2=585756&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-flowscript/cocoon-flowscript-impl/src/main/java/org/apache/cocoon/components/flow/javascript/fom/FOM_WebContinuation.java
(original)
+++ cocoon/trunk/blocks/cocoon-flowscript/cocoon-flowscript-impl/src/main/java/org/apache/cocoon/components/flow/javascript/fom/FOM_WebContinuation.java
Wed Oct 17 16:34:18 2007
@@ -45,18 +45,15 @@
     }
 
     static private boolean isBookmark(WebContinuation wk) {
-        UserObject userObj = (UserObject)wk.getUserObject();
-        if (userObj == null) {
-            return false;
-        }
-        return userObj.isBookmark;
+        UserObject userObj = (UserObject) wk.getUserObject();
+        return userObj != null && userObj.isBookmark;
     }
 
+
     public FOM_WebContinuation() {
         this(null);
     }
 
-
     public FOM_WebContinuation(WebContinuation wk) {
         this.wk = wk;
     }
@@ -67,21 +64,21 @@
     public static Object jsConstructor(Context cx, Object[] args,
                                        Function ctorObj,
                                        boolean inNewExpr)
-        throws Exception {
-        FOM_WebContinuation result = null;
+    throws Exception {
         if (args.length < 1) {
             // error
         }
-        Continuation c = (Continuation)unwrap(args[0]);
+        Continuation c = (Continuation) unwrap(args[0]);
         FOM_WebContinuation parent = null;
         if (args.length > 1) {
-            parent = (FOM_WebContinuation)args[1];
+            parent = (FOM_WebContinuation) args[1];
         }
         int timeToLive = 0;
         if (args.length > 2) {
             timeToLive =
-                (int)org.mozilla.javascript.Context.toNumber(args[2]);
+                    (int) org.mozilla.javascript.Context.toNumber(args[2]);
         }
+
         WebContinuation wk;
         Scriptable scope = getTopLevelScope(c);
         FOM_Cocoon cocoon = (FOM_Cocoon)getProperty(scope, "cocoon");
@@ -91,6 +88,8 @@
                                            timeToLive,
                                            cocoon.getInterpreterId(), 
                                            null);
+
+        FOM_WebContinuation result;
         result = new FOM_WebContinuation(wk);
         result.setParentScope(getTopLevelScope(scope));
         result.setPrototype(getClassPrototype(scope, result.getClassName()));



Mime
View raw message