Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix] RubyException#toJava(Object) shouldn't return null #5488

Merged
merged 1 commit into from Dec 3, 2018

Conversation

Projects
None yet
3 participants
@kares
Copy link
Member

commented Dec 2, 2018

... a regression since the exception hierarchy rewrite in 9.2
spotted at: sparklemotion/nokogiri#1818

for compat rubyException.toJava(Object.class) shall return self

[fix] RubyException#toJava(Object) shouldn't return null
... a regression since the exception hierarchy rewrite in 9.2
spotted at: sparklemotion/nokogiri#1818

for compat `rubyException.toJava(Object.class)` shall return self

@kares kares added this to the JRuby 9.2.5.0 milestone Dec 2, 2018

@headius

headius approved these changes Dec 3, 2018

Copy link
Member

left a comment

Good find!

@kares kares merged commit ddabc04 into master Dec 3, 2018

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
@kares

This comment has been minimized.

Copy link
Member Author

commented Dec 3, 2018

NOTE: no strong opinions against changing the behaviour of RubyException#toJava(Object.class) to return a RaiseException ... Nokogiri was able to work-around - to a proper array.entry(i).

this PR simply restores pre 9.2 ... with the new exception hierarchy it might make sense to convert by default. most Java convertable types do the coercion e.g. RubyString#toJava() - java.lang.String

@headius

This comment has been minimized.

Copy link
Member

commented Dec 3, 2018

I agree with making Object on down all return the throwable. 9.3? @enebo

@enebo

This comment has been minimized.

Copy link
Member

commented Dec 3, 2018

@headius @kares yeah I think 9.3 too.

@kares

This comment has been minimized.

Copy link
Member Author

commented Dec 4, 2018

okay - opened #5498 targeting 9.3 so its not forgotten

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.