uima-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Burn Lewis <burnle...@gmail.com>
Subject Unexpected default value for UIMA_DATAPATH
Date Mon, 07 May 2012 13:56:11 GMT
I recently created a Jira for what I believe is an inappropriate default
setting for UIMA_DATAPATH of user.dir -- the working directory.  Since when
importing by name the datapath is always searched before the classpath this
default setting can unexpectedly prevent the correct file from being found.
 We could just change the documentation to match the implementation but
that would require applications to always set UIMA_DATAPATH to some "safe"
value.

Changing the code to match the documentation (which implies a default of
"nothing") might break some existing applications (those that are
accidentally relying on an undocumented feature!) so I propose changing the
code so that when UIMA_DATAPATH is not defined the working directory is
searched AFTER the classpath.

   1. search datapath if UIMA_DATAPATH defined
   2. search classpath
   3. search working directory if UIMA_DATAPATH not defined

This still could break some existing applications but the likelihood is
very low, and the fix simple.

Alternatively we could always search the working directory last ... or
follow another infamous convention and do so only on Windows :)

Note that the Javadocs for the ResourceManager say that the datapath is
searched first, but most of the documentation hints at the reverse,
e.g. "resolved
using the classpath and/or the datapath"

~Burn

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message