incubator-projects mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Niclas Hedhman <nic...@hedhman.org>
Subject Re: [FTPServer] configuration
Date Tue, 10 Aug 2004 12:35:48 GMT

I must be VERY tired today....
I'll promise I read more carefully next time :o)

Cheers
Niclas

On Tuesday 10 August 2004 20:32, you wrote:
> On Aug 10, 2004, at 8:29 AM, Niclas Hedhman wrote:
> >> there won't be an NPE with the construct he proposed.
> >> Configuration.getChild() will synthesize the child configuration if it
> >> does not exist.
> >
> > Actually not. false is saying "don't do that".
> >
> > The snippet below can more easily be written as;
> >
> > mbCreateHome = conf.getChild( "create-user-home" ).getValueAsBoolean(
> > false );
> >
> > And, no NPE or ConfigurationExcepton will be thrown.
>
> right :) that's what was proposed:
> >>>> Why not use such construction?:
> >>>>
> >>>> mbCreateHome =
> >>>> conf.getChild("create-user-home").getValueAsBoolean(false);
>
> vs the original that explicitly said "do not create":
> >>>>        // get autometic user home creation flag
> >>>>        mbCreateHome = false;
> >>>>        tmpConf = conf.getChild("create-user-home", false);
> >>>>        if(tmpConf != null) {
> >>>>            mbCreateHome = tmpConf.getValueAsBoolean(mbCreateHome);
> >>>>        }
>
> -pete

-- 
   +------//-------------------+
  / http://www.bali.ac        /
 / http://niclas.hedhman.org / 
+------//-------------------+


---------------------------------------------------------------------
To unsubscribe, e-mail: projects-unsubscribe@incubator.apache.org
For additional commands, e-mail: projects-help@incubator.apache.org


Mime
View raw message