Hello,
When running `abcl.test' against r13286, I am experiencing a NullPointerException caused by the Pathname's URI having a null Path property. The patch below fixes this by reporting an error instead of just blindly passing it into java.io.File.
Hope this helps, -- /v\atthew
---8<---patch-----8<-- --- a/src/org/armedbear/lisp/Pathname.java +++ b/src/org/armedbear/lisp/Pathname.java @@ -356,8 +356,12 @@ public class Pathname extends LispObject { + "'" + url.toString() + "'" + ": " + ex.toString())); } - File file = new File(uri.getPath()); - Pathname p = new Pathname(file.getPath()); + final String uriPath = uri.getPath(); + if (null == uriPath) { + error(new FileError("The URI has no path: "+uri)); + } + final File file = new File(uriPath); + final Pathname p = new Pathname(file.getPath()); this.host = p.host; this.device = p.device; this.directory = p.directory; --->8--end-patch-->8--
---8<--exception-----8<-- ; (DEFTEST WINDOWS.4 ...) ; (DEFTEST WINDOWS.5 ...) ; (DEFTEST PATHNAME.WINDOWS.6 ...) Exception in thread "interpreter" java.lang.NullPointerException at java.io.File.<init>(File.java:222) at org.armedbear.lisp.Pathname.init(Pathname.java:359) at org.armedbear.lisp.Pathname.<init>(Pathname.java:174) at org.armedbear.lisp.Pathname.parseNamestring(Pathname.java:1021) at org.armedbear.lisp.Stream.readPathname(Stream.java:538) at org.armedbear.lisp.LispReader$15.execute(LispReader.java:247) --->8--end-exception-->8--
On 5/26/11 11:47 AM, Matthew L Daniel wrote:
When running `abcl.test' against r13286, I am experiencing a NullPointerException caused by the Pathname's URI having a null Path property. The patch below fixes this by reporting an error instead of just blindly passing it into java.io.File.
[…]
Your patch [has been applied as r13299][]. Thanks for the help!
[r13299]: http://trac.common-lisp.net/armedbear/changeset/13299
armedbear-devel@common-lisp.net