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

The Generator::State::op_href returns a raw java null when the given attribute is missing #155

Closed
wants to merge 2 commits into from

Conversation

jvshahid
Copy link
Contributor

Although the returned value compares to nil perfectly because JRuby do the conversion behind the scenes, calling anything on the returned object will cause a null pointer exception to be thrown.

This pull request includes a test to demonstrate the error and a fix for it.

@jvshahid
Copy link
Contributor Author

ping. is there anything stopping this pr from being merged ?

@edzhelyov
Copy link

👍 Please merge this PR.

1.7.6 doesn't fix the nullPointerException as you can test that with the following code

gem 'json', '=1.7.6'
require 'active_support/all'

puts JSON::VERSION

h = { a: 1 }
puts JSON.dump(h)

hi = HashWithIndifferentAccess.new(h)
puts JSON.dump(hi)

@flori
Copy link
Member

flori commented Feb 5, 2013

This problem is now fixed in the current master, so you can check it out.

@flori flori closed this Feb 5, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants