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

List operations sometimes fails #131

Closed
pilhuhn opened this issue Aug 16, 2016 · 0 comments
Closed

List operations sometimes fails #131

pilhuhn opened this issue Aug 16, 2016 · 0 comments
Milestone

Comments

@pilhuhn
Copy link
Member

pilhuhn commented Aug 16, 2016

@jmazzitelli and I saw this fly by:

Exception in thread "JavaFX Application Thread" org.jruby.exceptions.RaiseException: (NoMethodError) undefined method `[]' for nil:NilClass
    at RUBY.initialize(/Users/hrupp/.rvm/gems/jruby-9.1.2.0/gems/hawkular-client-2.4.0/lib/hawkular/inventory/entities.rb:122)
    at RUBY.block in list_operation_definitions(/Users/hrupp/.rvm/gems/jruby-9.1.2.0/gems/hawkular-client-2.4.0/lib/hawkular/inventory/inventory_api.rb:418)
    at org.jruby.RubyArray.each(org/jruby/RubyArray.java:1593)
    at RUBY.list_operation_definitions(/Users/hrupp/.rvm/gems/jruby-9.1.2.0/gems/hawkular-client-2.4.0/lib/hawkular/inventory/inventory_api.rb:417)
    at RUBY.list_operation_definitions_for_resource(/Users/hrupp/.rvm/gems/jruby-9.1.2.0/gems/hawkular-client-2.4.0/lib/hawkular/inventory/inventory_api.rb:429)
    at RUBY.add_operations(/Users/hrupp/src/hawkfx/lib/on_click_cell_factory.rb:130)
    at RUBY.block in initialize(/Users/hrupp/src/hawkfx/lib/on_click_cell_factory.rb:51)

Looking at the code shows param_list = op_hash['properties']['params'],
so it looks like the received entity sometimes has no properties (or worse: H-inventory sends us some empty hashes).

@pilhuhn pilhuhn modified the milestone: 2.5.0 Aug 16, 2016
lucasponce added a commit that referenced this issue Aug 18, 2016
Don't try to parse params if no properties are passed. Fixes #131
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

No branches or pull requests

1 participant