No __jcreate! error when creating Java FileOutputStream

Given the following line on JRuby 1.6.1, I get a nice Java
NullPointerException for the obvious reason that a string or file object
is required in the constructor…

output_stream = nil
-> NativeException: java.lang.NullPointerException: null
-> from `’

If however I do this…

output_stream =
->ArgumentError: no __jcreate! with arguments matching [] on object
-> from (irb):13:in `evaluate’

…I get something all together more sinister.

I’ve come across this by using attr_accessor within a Rails app and
forgetting to set a value upon it, producing the second stack trace

attr_accessor :file
output_stream = @file

Is this how I should expect this to behave (and thus I’ll have to rescue
ArgumentError or explicitly initialise @file) or should it really be
throwing a NullPointerException as I originally expected it to.