velocity-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gabriel Sidler <sid...@teamup.ch>
Subject Re: [PATCH] ChainedContext application vars not visible when session null
Date Thu, 02 May 2002 12:12:02 GMT
Tom Dunstan wrote:

> Hi folks
> 
> I think I've found a bug in the ChainedContext class in the tools/view
> sub-project.
> 
> If a user's session is null, the application attributes don't appear in
> the context.
> 
> Here's a patch to fix it.


Good catch! Thanks a lot for the report. I just commited the fix to
the repository.

> Sorry if this went to the wrong place, I couldn't see a tools specific
> dev list.


This is the right place! :-)


Gabe




> 
> Cheers
> 
> Tom
> 
> 
> 
> ------------------------------------------------------------------------
> 
> Index: view/src/java/org/apache/velocity/tools/view/context/ChainedContext.java
> ===================================================================
> RCS file: /home/cvspublic/jakarta-velocity-tools/view/src/java/org/apache/velocity/tools/view/context/ChainedContext.java,v
> retrieving revision 1.5
> diff -u -r1.5 ChainedContext.java
> --- view/src/java/org/apache/velocity/tools/view/context/ChainedContext.java	15 Apr 2002
18:30:29 -0000	1.5
> +++ view/src/java/org/apache/velocity/tools/view/context/ChainedContext.java	30 Apr 2002
06:44:28 -0000
> @@ -232,11 +232,11 @@
>              if ( o == null && session != null )
>              {
>                  o = session.getAttribute( key );
> -                
> -                if ( o == null )
> -                {
> -                    o = application.getAttribute( key );
> -                }
> +            }
> +
> +            if ( o == null )
> +            {
> +                o = application.getAttribute( key );
>              }
>          }
>          
> 
> 
> 
> ------------------------------------------------------------------------
> 
> --
> To unsubscribe, e-mail:   <mailto:velocity-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:velocity-dev-help@jakarta.apache.org>
> 


-- 
--
Gabriel Sidler
Software Engineer, Eivycom GmbH, Zurich, Switzerland


--
To unsubscribe, e-mail:   <mailto:velocity-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:velocity-dev-help@jakarta.apache.org>


Mime
View raw message