Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: JRuby 1.7.0.RC1
-
Fix Version/s: JRuby 1.7.0.RC2
-
Component/s: None
-
Labels:None
-
Environment:jruby 1.7.0.RC1 (1.9.3p203) 2012-09-25 8e849de on Java HotSpot(TM) 64-Bit Server VM 1.7.0_04-b21 [darwin-x86_64]
-
Number of attachments :
Description
The Ant integration spits out warnings about instance variables on non-persistent Java types. Try running the following command to see them:
ruby -e 'require "ant"; ant { echo :message => "hello" }'
prints
~/.rvm/rubies/jruby-1.7.0.RC1/lib/ruby/shared/ant/element.rb:61 warning: instance vars on non-persistent Java type Java::OrgApacheToolsAnt::UnknownElement (http://wiki.jruby.org/Persistence)
It happens when a Ruby instance variable is created in a attr_accessor added to a Java class, the call is here: https://github.com/jruby/jruby/blob/master/lib/ruby/shared/ant/element.rb#L62 but the error probably happens here https://github.com/jruby/jruby/blob/master/lib/ruby/shared/ant/element.rb#L9
This looks like JRUBY-6721, but I'm not sure since that is marked as fixed.
commit f94ab1290d21c27bb64294b70bba5495a611019c Author: Charles Oliver Nutter <headius@headius.com> Date: Fri Oct 5 11:49:22 2012 -0500 Fix JRUBY-6918 Ant: "instance vars on non-persistent Java type Java::OrgApacheToolsAnt::UnknownElement" Marked the class in question as __persistent__. :100644 100644 e5384bc... 32dd2cb... M lib/ruby/shared/ant/element.rb