Re: Bug: NetConfig() incompatible with VatTPMgr

Mark Miller <[email protected]>
Newsgroups gmane.comp.lang.e.general
Message-ID <[email protected]>
On Fri, Jan 8, 2010 at 1:56 PM, Kevin Reid <[email protected]> wrote:

> I tried this and was surprised to find it fail:
>
>   ? introducer.setNetConfig(<import:net.vattp.data.makeNetConfig>())
>   ? introducer.onTheAir()
>   # problem: <NullPointerException>
>
> NetConfig.java:
>     public NetConfig() {
>         this(ConstList.EmptyList, ConstList.EmptyList, null);
>     }
>
>
> VatTPMgr.java:
>         ConstList listenPath = netConfig.getListenAddrPath();
>         if (0 == listenPath.size()) {
>             listenPath = listenPath.with(null);
>         }
>
> The ordinary NetConfig construction (NetConfig.make) always puts a
> (possibly empty) ConstList in listenAddrPath. Should the no-args
> constructor do the same thing, or is there an intended semantic
> distinction from having an empty list vs. no list?
>
> Just looked to remind myself. No intended semantics. Looks like a just made
a simple mistake. (When I do intend a variable to possibly hold null, I'm
rather consistent about including an "opt" in the name.) Thanks for figuring
this out.

Big fixed and change committed.



> --
> Kevin Reid                                  <http://switchb.org/kpreid/>
>
>
>
>
> _______________________________________________
> e-lang mailing list
> [email protected]
> http://www.eros-os.org/mailman/listinfo/e-lang
>



-- 
Text by me above is hereby placed in the public domain

   Cheers,
   --MarkM

_______________________________________________
e-lang mailing list
[email protected]
http://www.eros-os.org/mailman/listinfo/e-lang
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.