History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: JRUBY-1883
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Blocker Blocker
Assignee: Ola Bini
Reporter: Charles Oliver Nutter
Votes: 1
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
JRuby

RubySignal should be modified to not try to load Sun-specific Signal classes when they are not present

Created: 04/Jan/08 12:06 PM   Updated: 23/Apr/08 10:03 AM
Component/s: Core Classes/Modules
Affects Version/s: None
Fix Version/s: JRuby 1.1RC1

Time Tracking:
Not Specified


 Description  « Hide
The current RubySignal code directly references sun.* classes for Signal handling. This has two issues:
  • these classes don't exist on all JVMs
  • this causes deprecation errors on a number of JDKs and is warned against in many IDEs

The latter is par for the course and there's not really a way around it, but the former is a serious problem that prevents JRuby from loading on non-Sun-based JVMs.

The classes in question should be abstracted out so RubySignal can fail gracefully when they are not present. There should be no directly classloading requirement from JRuby to Sun-specific classes.



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Vladimir Sizikov - 04/Jan/08 12:21 PM
My understanding was that if sun.misc is not present, then JRuby still works, just without signals, and gives the warning about signals not being supported. So, it's not as bad as complete inability to run JRuby on non-Sun JVMs.

Some other things that not good with references to sun.misc:

1. Lots of warning during the build, they could hide real warnings.

2. ClassLoaders in security-sensitive environments (Applet, WebStart) are not permitted to load sun.misc.* classes.


Ola Bini - 05/Jan/08 07:23 AM
Introduced a facade that is loaded through reflection and falls back on a no-functionality implementation otherwise. Should be enough to fix all the problems with this bug, except for the warnings.