cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tuomo L <tleso...@cc.hut.fi>
Subject RE: getxml in XSP throws NPE if @path is invalid
Date Tue, 21 Oct 2003 09:48:25 GMT
Thank you!

On Tue, 21 Oct 2003, Carsten Ziegeler wrote:

> Hi,
>
> I just reverted the change. The behaviour now should be as you
> descripe it. But this means, that you get your NPE again if you
> don't take care of it.
>
> Carsten
>
> > -----Original Message-----
> > From: Tuomo L [mailto:tlesonen@cc.hut.fi]
> > Sent: Wednesday, October 15, 2003 9:14 AM
> > To: dev@cocoon.apache.org
> > Subject: RE: getxml in XSP throws NPE if @path is invalid
> >
> >
> > Hi Carsten,
> >
> > I'd say null is the way to go, no matter what @as is. Isn't empty
> > DocumentFragment just like an empty string? Empty string is still a
> > string, and sometimes usefull in XSP.
> >
> > So, returning null if:
> >
> > @path does not exist in the session context (or @path is an empty string)
> > @path does not exits as an attribute
> >
> > -Tuomo
> >
> > On Tue, 14 Oct 2003, Carsten Ziegeler wrote:
> >
> > > Antonio Gallardo wrote:
> > > >
> > > > Antonio Gallardo dijo:
> > > > > Please comment if this works for you. I am not sure if this
> > will work,
> > > > > since Carsten did changes in the Helperclass in order to helps you.
> > > >
> > > > Hi, I am again!
> > > >
> > > > Sometimes I am lazy! :-D But I decided to check the
> > Helperclass mentioned
> > > > in my last mail:
> > > >
> > > > The Carsten's change is if the value of @path does not exists, then
> > > > instead of return null, it will return a emptry String ("").
> > > >
> > > > I am not sure if this will meet your request since there are
> > 2 diferents
> > > > objects to be returned:
> > > >
> > > > If there is a value at @path, then as="object" returns a
> > DocumentFragment
> > > > If there is NOT a value, then it will return a String "".
> > > >
> > > > I don't like the idea. But I am not a Java guru. I think we
> > need to revert
> > > > the change to allow return null again. What you think?
> > > >
> > > Ok, you're right. I think returning either null or an empty
> > DocumentFragment
> > > is the way to go. I can change it in any way, but as I'm not a
> > user of XSP
> > > I don't know which solution is better for developing XSP. Just tell and
> > > I will change it the way you want.
> > >
> > > Carsten
> > >
> >
>

Mime
View raw message