If it is null the PathManager method takes that into account, and does some extra work (i.e a new File().getAbsolutePath()). In any case this if..else block is not needed.