Re: Re: [opencms-dev] Ver6: Article Management Module is out!!!
lists at rueth.info
lists at rueth.info
Mon Feb 7 16:58:02 CET 2005
Hi guys,
thanks for this amusing discussion --- and even if not really necessary,
I'll update the module tonight.
Regards
Ulrich
Robert Burén <robert.buren at gmail.com> schrieb am 07.02.2005, 16:52:24:
> Ok, this is silly, but...
>
> Boolean.valueOf() doesn't actually create a new instance of Boolean.
> It returns either Boolean.TRUE or Boolean.FALSE, which are public
> static final members of Boolean.
>
> And so, your code isn't actually even slighter more efficient and the
> code should be written like Alexander said, simply because that's what
> those methods are there for, and the code is clearer.
>
> Again -- silly. Nothing to get too exited about...
>
> :-)
>
> /Robert
>
>
>
>
> On Mon, 07 Feb 2005 16:34:47 +0100, Robert Petermeier wrote:
> > Hi Alex!
> >
> > Alexander Kandzior schrieb:
> > > Instead of
> > >
> > > boolean openInNewWindow = (s != null && s.equalsIgnoreCase("true"))
> > >
> > > I recommend writing it like this:
> > >
> > > boolean openInNewWindow = Boolean.valueOf(s).booleanValue();
> >
> > That should yield exactly the same result but creates one more Boolean
> > object that has to be garbage-collected, so I was assuming my code was
> > slightly more efficient;-)
> >
> > Regards,
> > Robert
> >
> >
> > _______________________________________________
> > This mail is send to you from the opencms-dev mailing list
> > To change your list options, or to unsubscribe from the list, please visit
> > http://mail.opencms.org/mailman/listinfo/opencms-dev
> >
>
>
> _______________________________________________
> This mail is send to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://mail.opencms.org/mailman/listinfo/opencms-dev
More information about the opencms-dev
mailing list