Thread#priority should default to zero
--------------------------------------
Key: JRUBY-5289
URL: http://jira.codehaus.org/browse/JRUBY-5289
Project: JRuby
Issue Type: Bug
Components: Core Classes/Modules
Affects Versions: JRuby 1.5.6
Environment: OS X 10.5
jruby 1.5.6 (ruby 1.8.7 patchlevel 249) (2010-12-03 9cf97c3) (Java HotSpot(TM)
64-Bit Server VM 1.6.0_22) [x86_64-java]
Reporter: Daniel Berger
In MRI Thread#priority defaults to 0. In JRuby it returns nil. The following
code actually NPE's on me:
{code}
thread = Thread.new{ sleep 1 while true }
p thread.priority.to_s # => "0" in MRI
thread.exit
{code}
Here's the NPE:
{code}
CachingCallSite.java:406:in `pollAndGetClass': java.lang.NullPointerException
from CachingCallSite.java:103:in `call'
from test.rb:2:in `__file__'
from test.rb:-1:in `load'
from Ruby.java:690:in `runScript'
from Ruby.java:573:in `runNormally'
from Ruby.java:416:in `runFromMain'
from Main.java:286:in `run'
from Main.java:128:in `run'
from Main.java:97:in `main'
{code}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email