r9617 - helma-ng/trunk/src/org/helma/javascript
[email protected] Mon, 13 Apr 2009 21:36:31 +0200 (CEST)
| Newsgroups | gmane.comp.java.helma.cvs |
|---|---|
| Message-ID | <20090413193631.07A8D3D0D6@mia> |
Author: hannes
Date: 2009-04-13 21:36:30 +0200 (Mon, 13 Apr 2009)
New Revision: 9617
Modified:
helma-ng/trunk/src/org/helma/javascript/RhinoEngine.java
Log:
Avoid NullPointerException for relative path lookups with no local path.
Details at http://dev.helma.org/trac/helma/changeset/9617
Modified: helma-ng/trunk/src/org/helma/javascript/RhinoEngine.java
===================================================================
--- helma-ng/trunk/src/org/helma/javascript/RhinoEngine.java 2009-04-12 21:26:34 UTC (rev 9616)
+++ helma-ng/trunk/src/org/helma/javascript/RhinoEngine.java 2009-04-13 19:36:30 UTC (rev 9617)
@@ -502,7 +502,7 @@
File file = new File(path);
if (file.isAbsolute()) {
return new FileResource(file);
- } else if (path.startsWith(".")) {
+ } else if (localPath != null && path.startsWith(".")) {
return localPath.getResource(path);
} else {
return config.getResource(path);