cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joerg Heinicke <joerg.heini...@gmx.de>
Subject Re: svn commit: r454130 - in /cocoon/trunk/blocks/cocoon-flowscript/cocoon-flowscript-impl/src/main/java/org/apache/cocoon/components/flow: javascript/JavaScriptFlowHelper.java javascript/fom/FOM_JavaScriptFlowHelper.java util/PipelineUtil.java
Date Sun, 08 Oct 2006 11:47:43 GMT
There seems to be something wrong with my line endings. Where do I set them?

Jörg

> +package org.apache.cocoon.components.flow.javascript;
> 
> +
> 
> +import org.apache.cocoon.components.flow.FlowHelper;
> 
> +
> 
> +import org.mozilla.javascript.Undefined;
> 
> +import org.mozilla.javascript.Wrapper;
> 
> +
> 
> +public class JavaScriptFlowHelper extends FlowHelper {
> 
> +
> 
> +    /**
> 
> +     * Unwrap a Rhino object (getting the raw java object) and convert undefined to
null
> 
> +     */
> 
> +    public static Object unwrap(Object obj) {
> 
> +        if (obj instanceof Wrapper) {
> 
> +            obj = ((Wrapper)obj).unwrap();
> 
> +        } else if (obj == Undefined.instance) {
> 
> +            obj = null;
> 
> +        }
> 
> +        return obj;
> 
> +    }
> 
> +
> 
> +}

Mime
View raw message