W3C home > Mailing lists > Public > xproc-dev@w3.org > July 2011

NPE in Calabash trunk (using property user.home)

From: Florent Georges <fgeorges@fgeorges.org>
Date: Fri, 8 Jul 2011 14:14:31 +0200
Message-ID: <CADyR_r12-iHGSo12GQNtaF7h8bAScF-V2CD1L95Q-imUc0P8QA@mail.gmail.com>
To: XProc Dev <xproc-dev@w3.org>

  In the current revision of the trunk (#672), URIUtils.java
contains the method homeAsURI() which calls dirAsURI() with the
value of the system property "user.home":

    public static URI homeAsURI() {
        return dirAsURI(System.getProperty("user.home"));

  dirAsURI() calls encode() which in turn dereferences the value
of the property without checking for nullness.  Even though it
could be null in some environments (e.g. a web container).

  I am not sure how the null case could be treated (ignoring it?)
but as for now it just crashes with an NPE.


Florent Georges
Received on Friday, 8 July 2011 12:15:19 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:03:08 UTC