Details
-
Type:
Improvement
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 3.0
-
Component/s: Quality Profile
-
Labels:None
-
Number of attachments :
Description
Whereas we expect exception during server startup with a meaninful message, which clearly says which plugin and which rule has no title or description.
For the information in Sonar 2.14-RC1 error when description not available looks like :
2012.03.06 12:19:50 ERROR o.s.s.ui.JRubyFacade Fail to render: http://localhost:9000/rules_configuration/index/4?searchtext=&plugins%5B%5D=cppcheck&priorities%5B%5D=&rule_status=&commit=Search
undefined method `strip' for nil:NilClass
On line #10 of app/views/rules_configuration/_rule_note.html.erb
7: submit_note_update_button_id = "snub_" + rule.id.to_s
8: %>
9: <div id="<%= note_detail_div_id -%>">
10: <% if rule.description.strip.start_with?('<p>') %>
11: <%= rule.description %>
12: <% else %>
13: <p><%= rule.description %></p>
app/views/rules_configuration/_rule_note.html.erb:10
org/jruby/RubyKernel.java:2056:in `send'
app/views/rules_configuration/_rule.html.erb:37
org/jruby/RubyKernel.java:2056:in `send'
app/views/rules_configuration/index.html.erb:116
org/jruby/RubyArray.java:1602:in `each'
app/views/rules_configuration/index.html.erb:112
org/jruby/RubyKernel.java:2056:in `send'
org/jruby/RubyKernel.java:2052:in `send'
org/jruby/RubyProc.java:268:in `call'
org/jruby/RubyProc.java:228:in `call'
/tmp/sonar/tomcat6x/work/Catalina/localhost/_/loader/vendor/rack-1.2.1/rack/head.rb:9:in `call'
/tmp/sonar/tomcat6x/work/Catalina/localhost/_/loader/vendor/rack-1.2.1/rack/methodoverride.rb:24:in `call'
/tmp/sonar/tomcat6x/work/Catalina/localhost/_/loader/jruby/rack/session_store.rb:42:in `call'
/tmp/sonar/tomcat6x/work/Catalina/localhost/_/loader/rack/adapter/rails.rb:36:in `serve_rails'
/tmp/sonar/tomcat6x/work/Catalina/localhost/_/loader/rack/adapter/rails.rb:41:in `call'
/tmp/sonar/tomcat6x/work/Catalina/localhost/_/loader/jruby/rack/rails.rb:185:in `call'
/tmp/sonar/tomcat6x/work/Catalina/localhost/_/loader/rack/handler/servlet.rb:19:in `call'
and when title not available :
undefined method `downcase' for nil:NilClass
/tmp/sonar/tomcat6x/temp/0-ROOT/WEB-INF/app/models/rule.rb:69:in `<=>'
org/jruby/RubyArray.java:3242:in `sort!'
org/jruby/RubyArray.java:3221:in `sort'
/tmp/sonar/tomcat6x/temp/0-ROOT/WEB-INF/app/models/rule.rb:269:in `search'
/tmp/sonar/tomcat6x/temp/0-ROOT/WEB-INF/app/controllers/rules_configuration_controller.rb:61:in `index'
Issue Links
- depends upon
-
SONAR-3343
When a rule is annotated, its name and its description fields should be saved as NULL if they are not not provided
-
- is related to
-
SONAR-3769
When a rule doesn't have a description, a quality profile containing this rule can't be displayed when using Oracle DB
-
-
SONAR-3359
Remove the possibility to create a rule without a description in the Web UI
-
Activity
Evgeny Mandrikov
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Description | Whereas we just expect to not see any rule description. |
Whereas we just expect to not see any rule description.
For the information in Sonar 2.14-RC1 error looks like : {noformat} 2012.03.06 12:19:50 ERROR o.s.s.ui.JRubyFacade Fail to render: http://localhost:9000/rules_configuration/index/4?searchtext=&plugins%5B%5D=cppcheck&priorities%5B%5D=&rule_status=&commit=Search undefined method `strip' for nil:NilClass On line #10 of app/views/rules_configuration/_rule_note.html.erb 7: submit_note_update_button_id = "snub_" + rule.id.to_s 8: %> 9: <div id="<%= note_detail_div_id -%>"> 10: <% if rule.description.strip.start_with?('<p>') %> 11: <%= rule.description %> 12: <% else %> 13: <p><%= rule.description %></p> app/views/rules_configuration/_rule_note.html.erb:10 org/jruby/RubyKernel.java:2056:in `send' app/views/rules_configuration/_rule.html.erb:37 org/jruby/RubyKernel.java:2056:in `send' app/views/rules_configuration/index.html.erb:116 org/jruby/RubyArray.java:1602:in `each' app/views/rules_configuration/index.html.erb:112 org/jruby/RubyKernel.java:2056:in `send' org/jruby/RubyKernel.java:2052:in `send' org/jruby/RubyProc.java:268:in `call' org/jruby/RubyProc.java:228:in `call' /tmp/sonar/tomcat6x/work/Catalina/localhost/_/loader/vendor/rack-1.2.1/rack/head.rb:9:in `call' /tmp/sonar/tomcat6x/work/Catalina/localhost/_/loader/vendor/rack-1.2.1/rack/methodoverride.rb:24:in `call' /tmp/sonar/tomcat6x/work/Catalina/localhost/_/loader/jruby/rack/session_store.rb:42:in `call' /tmp/sonar/tomcat6x/work/Catalina/localhost/_/loader/rack/adapter/rails.rb:36:in `serve_rails' /tmp/sonar/tomcat6x/work/Catalina/localhost/_/loader/rack/adapter/rails.rb:41:in `call' /tmp/sonar/tomcat6x/work/Catalina/localhost/_/loader/jruby/rack/rails.rb:185:in `call' /tmp/sonar/tomcat6x/work/Catalina/localhost/_/loader/rack/handler/servlet.rb:19:in `call' {noformat} |
Freddy Mallet
made changes -
| Summary | When there isn't any description available on a rule, a NullPointerException is thrown | When there isn't any description or title available on a rule, a NullPointerException is thrown |
Evgeny Mandrikov
made changes -
| Description |
Whereas we just expect to not see any rule description.
For the information in Sonar 2.14-RC1 error looks like : {noformat} 2012.03.06 12:19:50 ERROR o.s.s.ui.JRubyFacade Fail to render: http://localhost:9000/rules_configuration/index/4?searchtext=&plugins%5B%5D=cppcheck&priorities%5B%5D=&rule_status=&commit=Search undefined method `strip' for nil:NilClass On line #10 of app/views/rules_configuration/_rule_note.html.erb 7: submit_note_update_button_id = "snub_" + rule.id.to_s 8: %> 9: <div id="<%= note_detail_div_id -%>"> 10: <% if rule.description.strip.start_with?('<p>') %> 11: <%= rule.description %> 12: <% else %> 13: <p><%= rule.description %></p> app/views/rules_configuration/_rule_note.html.erb:10 org/jruby/RubyKernel.java:2056:in `send' app/views/rules_configuration/_rule.html.erb:37 org/jruby/RubyKernel.java:2056:in `send' app/views/rules_configuration/index.html.erb:116 org/jruby/RubyArray.java:1602:in `each' app/views/rules_configuration/index.html.erb:112 org/jruby/RubyKernel.java:2056:in `send' org/jruby/RubyKernel.java:2052:in `send' org/jruby/RubyProc.java:268:in `call' org/jruby/RubyProc.java:228:in `call' /tmp/sonar/tomcat6x/work/Catalina/localhost/_/loader/vendor/rack-1.2.1/rack/head.rb:9:in `call' /tmp/sonar/tomcat6x/work/Catalina/localhost/_/loader/vendor/rack-1.2.1/rack/methodoverride.rb:24:in `call' /tmp/sonar/tomcat6x/work/Catalina/localhost/_/loader/jruby/rack/session_store.rb:42:in `call' /tmp/sonar/tomcat6x/work/Catalina/localhost/_/loader/rack/adapter/rails.rb:36:in `serve_rails' /tmp/sonar/tomcat6x/work/Catalina/localhost/_/loader/rack/adapter/rails.rb:41:in `call' /tmp/sonar/tomcat6x/work/Catalina/localhost/_/loader/jruby/rack/rails.rb:185:in `call' /tmp/sonar/tomcat6x/work/Catalina/localhost/_/loader/rack/handler/servlet.rb:19:in `call' {noformat} |
Whereas we just expect to not see any rule description.
For the information in Sonar 2.14-RC1 error when description not available looks like : {noformat} 2012.03.06 12:19:50 ERROR o.s.s.ui.JRubyFacade Fail to render: http://localhost:9000/rules_configuration/index/4?searchtext=&plugins%5B%5D=cppcheck&priorities%5B%5D=&rule_status=&commit=Search undefined method `strip' for nil:NilClass On line #10 of app/views/rules_configuration/_rule_note.html.erb 7: submit_note_update_button_id = "snub_" + rule.id.to_s 8: %> 9: <div id="<%= note_detail_div_id -%>"> 10: <% if rule.description.strip.start_with?('<p>') %> 11: <%= rule.description %> 12: <% else %> 13: <p><%= rule.description %></p> app/views/rules_configuration/_rule_note.html.erb:10 org/jruby/RubyKernel.java:2056:in `send' app/views/rules_configuration/_rule.html.erb:37 org/jruby/RubyKernel.java:2056:in `send' app/views/rules_configuration/index.html.erb:116 org/jruby/RubyArray.java:1602:in `each' app/views/rules_configuration/index.html.erb:112 org/jruby/RubyKernel.java:2056:in `send' org/jruby/RubyKernel.java:2052:in `send' org/jruby/RubyProc.java:268:in `call' org/jruby/RubyProc.java:228:in `call' /tmp/sonar/tomcat6x/work/Catalina/localhost/_/loader/vendor/rack-1.2.1/rack/head.rb:9:in `call' /tmp/sonar/tomcat6x/work/Catalina/localhost/_/loader/vendor/rack-1.2.1/rack/methodoverride.rb:24:in `call' /tmp/sonar/tomcat6x/work/Catalina/localhost/_/loader/jruby/rack/session_store.rb:42:in `call' /tmp/sonar/tomcat6x/work/Catalina/localhost/_/loader/rack/adapter/rails.rb:36:in `serve_rails' /tmp/sonar/tomcat6x/work/Catalina/localhost/_/loader/rack/adapter/rails.rb:41:in `call' /tmp/sonar/tomcat6x/work/Catalina/localhost/_/loader/jruby/rack/rails.rb:185:in `call' /tmp/sonar/tomcat6x/work/Catalina/localhost/_/loader/rack/handler/servlet.rb:19:in `call' {noformat} and when title not available : {noformat} undefined method `downcase' for nil:NilClass /tmp/sonar/tomcat6x/temp/0-ROOT/WEB-INF/app/models/rule.rb:69:in `<=>' org/jruby/RubyArray.java:3242:in `sort!' org/jruby/RubyArray.java:3221:in `sort' /tmp/sonar/tomcat6x/temp/0-ROOT/WEB-INF/app/models/rule.rb:269:in `search' /tmp/sonar/tomcat6x/temp/0-ROOT/WEB-INF/app/controllers/rules_configuration_controller.rb:61:in `index' {noformat} |
Fabrice Bellingard
made changes -
| Status | Open [ 1 ] | In Progress [ 3 ] |
Evgeny Mandrikov
made changes -
| Description |
Whereas we just expect to not see any rule description.
For the information in Sonar 2.14-RC1 error when description not available looks like : {noformat} 2012.03.06 12:19:50 ERROR o.s.s.ui.JRubyFacade Fail to render: http://localhost:9000/rules_configuration/index/4?searchtext=&plugins%5B%5D=cppcheck&priorities%5B%5D=&rule_status=&commit=Search undefined method `strip' for nil:NilClass On line #10 of app/views/rules_configuration/_rule_note.html.erb 7: submit_note_update_button_id = "snub_" + rule.id.to_s 8: %> 9: <div id="<%= note_detail_div_id -%>"> 10: <% if rule.description.strip.start_with?('<p>') %> 11: <%= rule.description %> 12: <% else %> 13: <p><%= rule.description %></p> app/views/rules_configuration/_rule_note.html.erb:10 org/jruby/RubyKernel.java:2056:in `send' app/views/rules_configuration/_rule.html.erb:37 org/jruby/RubyKernel.java:2056:in `send' app/views/rules_configuration/index.html.erb:116 org/jruby/RubyArray.java:1602:in `each' app/views/rules_configuration/index.html.erb:112 org/jruby/RubyKernel.java:2056:in `send' org/jruby/RubyKernel.java:2052:in `send' org/jruby/RubyProc.java:268:in `call' org/jruby/RubyProc.java:228:in `call' /tmp/sonar/tomcat6x/work/Catalina/localhost/_/loader/vendor/rack-1.2.1/rack/head.rb:9:in `call' /tmp/sonar/tomcat6x/work/Catalina/localhost/_/loader/vendor/rack-1.2.1/rack/methodoverride.rb:24:in `call' /tmp/sonar/tomcat6x/work/Catalina/localhost/_/loader/jruby/rack/session_store.rb:42:in `call' /tmp/sonar/tomcat6x/work/Catalina/localhost/_/loader/rack/adapter/rails.rb:36:in `serve_rails' /tmp/sonar/tomcat6x/work/Catalina/localhost/_/loader/rack/adapter/rails.rb:41:in `call' /tmp/sonar/tomcat6x/work/Catalina/localhost/_/loader/jruby/rack/rails.rb:185:in `call' /tmp/sonar/tomcat6x/work/Catalina/localhost/_/loader/rack/handler/servlet.rb:19:in `call' {noformat} and when title not available : {noformat} undefined method `downcase' for nil:NilClass /tmp/sonar/tomcat6x/temp/0-ROOT/WEB-INF/app/models/rule.rb:69:in `<=>' org/jruby/RubyArray.java:3242:in `sort!' org/jruby/RubyArray.java:3221:in `sort' /tmp/sonar/tomcat6x/temp/0-ROOT/WEB-INF/app/models/rule.rb:269:in `search' /tmp/sonar/tomcat6x/temp/0-ROOT/WEB-INF/app/controllers/rules_configuration_controller.rb:61:in `index' {noformat} |
Whereas we expect exception during server startup with a meaninful message, which clearly says which plugin and which rule has no title or description.
For the information in Sonar 2.14-RC1 error when description not available looks like : {noformat} 2012.03.06 12:19:50 ERROR o.s.s.ui.JRubyFacade Fail to render: http://localhost:9000/rules_configuration/index/4?searchtext=&plugins%5B%5D=cppcheck&priorities%5B%5D=&rule_status=&commit=Search undefined method `strip' for nil:NilClass On line #10 of app/views/rules_configuration/_rule_note.html.erb 7: submit_note_update_button_id = "snub_" + rule.id.to_s 8: %> 9: <div id="<%= note_detail_div_id -%>"> 10: <% if rule.description.strip.start_with?('<p>') %> 11: <%= rule.description %> 12: <% else %> 13: <p><%= rule.description %></p> app/views/rules_configuration/_rule_note.html.erb:10 org/jruby/RubyKernel.java:2056:in `send' app/views/rules_configuration/_rule.html.erb:37 org/jruby/RubyKernel.java:2056:in `send' app/views/rules_configuration/index.html.erb:116 org/jruby/RubyArray.java:1602:in `each' app/views/rules_configuration/index.html.erb:112 org/jruby/RubyKernel.java:2056:in `send' org/jruby/RubyKernel.java:2052:in `send' org/jruby/RubyProc.java:268:in `call' org/jruby/RubyProc.java:228:in `call' /tmp/sonar/tomcat6x/work/Catalina/localhost/_/loader/vendor/rack-1.2.1/rack/head.rb:9:in `call' /tmp/sonar/tomcat6x/work/Catalina/localhost/_/loader/vendor/rack-1.2.1/rack/methodoverride.rb:24:in `call' /tmp/sonar/tomcat6x/work/Catalina/localhost/_/loader/jruby/rack/session_store.rb:42:in `call' /tmp/sonar/tomcat6x/work/Catalina/localhost/_/loader/rack/adapter/rails.rb:36:in `serve_rails' /tmp/sonar/tomcat6x/work/Catalina/localhost/_/loader/rack/adapter/rails.rb:41:in `call' /tmp/sonar/tomcat6x/work/Catalina/localhost/_/loader/jruby/rack/rails.rb:185:in `call' /tmp/sonar/tomcat6x/work/Catalina/localhost/_/loader/rack/handler/servlet.rb:19:in `call' {noformat} and when title not available : {noformat} undefined method `downcase' for nil:NilClass /tmp/sonar/tomcat6x/temp/0-ROOT/WEB-INF/app/models/rule.rb:69:in `<=>' org/jruby/RubyArray.java:3242:in `sort!' org/jruby/RubyArray.java:3221:in `sort' /tmp/sonar/tomcat6x/temp/0-ROOT/WEB-INF/app/models/rule.rb:269:in `search' /tmp/sonar/tomcat6x/temp/0-ROOT/WEB-INF/app/controllers/rules_configuration_controller.rb:61:in `index' {noformat} |
Fabrice Bellingard
made changes -
| Original Estimate | 0 minutes [ 0 ] | |
| Remaining Estimate | 0 minutes [ 0 ] | |
| Assignee | Fabrice Bellingard [ fabemn ] | Freddy Mallet [ freddy.mallet ] |
Fabrice Bellingard
made changes -
| Status | In Progress [ 3 ] | Resolved [ 5 ] |
| Resolution | Fixed [ 1 ] |
Freddy Mallet
made changes -
| Link |
This issue depends upon |
Freddy Mallet
made changes -
| Assignee | Freddy Mallet [ freddy.mallet ] | Fabrice Bellingard [ fabemn ] |
Fabrice Bellingard
made changes -
| Status | Resolved [ 5 ] | Closed [ 6 ] |
Fabrice Bellingard
made changes -
| Link |
This issue is related to |
Freddy Mallet
made changes -
| Link |
This issue is related to |