Ticket #1576
I want to get InStream for the file specified by a Uri. The following works fine:
InStream
f := `file:/path/to/file`.get in := f.in
But when I try
in := `file:/path/to/file`.get->in
I got an exception:
fan.sys.Method.invoke (Method.java:582) fan.sys.Method$MethodFunc.callOn (Method.java:230) fan.sys.FanObj.doTrap (FanObj.java:192) fan.sys.FanObj.trap (FanObj.java:183) fan.sys.FanObj.trap (FanObj.java:177) diff::FileExample.main (FileExample.fan:12) java.lang.reflect.Method.invoke (Method.java:597) fan.sys.Method.invoke (Method.java:552) fan.sys.Method$MethodFunc.callList (Method.java:198) fan.sys.Method.callList (Method.java:138) fanx.tools.Fan.callMain (Fan.java:135) fanx.tools.Fan.executeType (Fan.java:102) fanx.tools.Fan.execute (Fan.java:38) fanx.tools.Fan.run (Fan.java:250) fanx.tools.Fan.main (Fan.java:288)
Is it a bug?
Promoted to ticket #1576 and assigned to brian
Definitely looks like a bug. Sometimes the reflection code in the sys package gets tricky since it is all mixed up with Java code.
Renamed from NPE when Uri.get->in to Fix Java sys method reflection
Ticket resolved in 1.0.60
I pushed a fix - changeset
Login or Signup to reply.
dsav Fri 15 Jul 2011
I want to get
InStream
for the file specified by a Uri. The following works fine:But when I try
I got an exception:
Is it a bug?
brian Fri 15 Jul 2011
Promoted to ticket #1576 and assigned to brian
Definitely looks like a bug. Sometimes the reflection code in the sys package gets tricky since it is all mixed up with Java code.
brian Fri 15 Jul 2011
Renamed from NPE when Uri.get->in to Fix Java sys method reflection
brian Fri 15 Jul 2011
Ticket resolved in 1.0.60
I pushed a fix - changeset