[e-lang] Bug: NetConfig() incompatible with VatTPMgr

Mark Miller erights at gmail.com
Tue Jan 12 20:59:52 PST 2010


On Fri, Jan 8, 2010 at 1:56 PM, Kevin Reid <kpreid at mac.com> 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
> e-lang at mail.eros-os.org
> http://www.eros-os.org/mailman/listinfo/e-lang
>



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

   Cheers,
   --MarkM
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.eros-os.org/pipermail/e-lang/attachments/20100112/2d6b73fe/attachment-0001.html 


More information about the e-lang mailing list