diff options
author | Julien Lancelot <julien.lancelot@gmail.com> | 2013-05-27 13:48:54 +0200 |
---|---|---|
committer | Julien Lancelot <julien.lancelot@gmail.com> | 2013-05-27 13:48:54 +0200 |
commit | 59193935832caf91e534a46b523593cc9dcc4ba8 (patch) | |
tree | 7d312cf70a0db60342aed953ae09a16f9a870d41 | |
parent | 611d41623a6f32a9d0e9371cc4e61114ea682162 (diff) | |
download | sonarqube-59193935832caf91e534a46b523593cc9dcc4ba8.tar.gz sonarqube-59193935832caf91e534a46b523593cc9dcc4ba8.zip |
SONAR-4301 Remove securityExclusions parameter
14 files changed, 4 insertions, 40 deletions
diff --git a/sonar-core/src/main/java/org/sonar/core/issue/DefaultIssueQueryResult.java b/sonar-core/src/main/java/org/sonar/core/issue/DefaultIssueQueryResult.java index 5b2b562f8fc..aabd51bca84 100644 --- a/sonar-core/src/main/java/org/sonar/core/issue/DefaultIssueQueryResult.java +++ b/sonar-core/src/main/java/org/sonar/core/issue/DefaultIssueQueryResult.java @@ -44,7 +44,6 @@ public class DefaultIssueQueryResult implements IssueQueryResult { private final Map<String, Component> projectsByKey = Maps.newHashMap(); private final Map<String, ActionPlan> actionPlansByKey = Maps.newHashMap(); private final Map<String, User> usersByLogin = Maps.newHashMap(); - private boolean securityExclusions; private boolean maxResultsReached; private Paging paging; @@ -88,11 +87,6 @@ public class DefaultIssueQueryResult implements IssueQueryResult { return this; } - public DefaultIssueQueryResult setSecurityExclusions(boolean securityExclusions){ - this.securityExclusions = securityExclusions; - return this; - } - public DefaultIssueQueryResult setMaxResultsReached(boolean maxResultsReached){ this.maxResultsReached = maxResultsReached; return this; @@ -160,11 +154,6 @@ public class DefaultIssueQueryResult implements IssueQueryResult { } @Override - public boolean securityExclusions() { - return securityExclusions; - } - - @Override public boolean maxResultsReached() { return maxResultsReached; } diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/issue/IssueQueryResult.java b/sonar-plugin-api/src/main/java/org/sonar/api/issue/IssueQueryResult.java index 4a710cecaa6..10794184db9 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/issue/IssueQueryResult.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/issue/IssueQueryResult.java @@ -73,7 +73,5 @@ public interface IssueQueryResult { Paging paging(); - boolean securityExclusions(); - boolean maxResultsReached(); } diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/issues_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/issues_controller.rb index 77b9f9ca2f4..d827f542639 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/issues_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/issues_controller.rb @@ -30,7 +30,6 @@ class Api::IssuesController < Api::ApiController def search results = Api.issues.find(params) hash = { - :securityExclusions => results.securityExclusions, :maxResultsReached => results.maxResultsReached, :paging => paging_to_hash(results.paging), :issues => results.issues.map { |issue| Issue.to_hash(issue) }, diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/issues/search.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/issues/search.html.erb index 5c2e114c51a..222f19c5786 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/issues/search.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/issues/search.html.erb @@ -7,13 +7,8 @@ <div class="page-split-right"> <div id="content"> <div class="marginbottom10"> - <% if @filter.issues_result %> - <% if @filter.issues_result.securityExclusions() %> - <p class="notes"><%= message('results_not_display_due_to_security') -%></p> - <% end %> - <% if @filter.issues_result.maxResultsReached() %> - <p class="notes"><%= message('issue_filter.max_results_reached', :params => @filter.paging.total()) -%></p> - <% end %> + <% if @filter.issues_result && @filter.issues_result.maxResultsReached() %> + <p class="notes"><%= message('issue_filter.max_results_reached', :params => @filter.paging.total()) -%></p> <% end %> <%= render :partial => 'list' -%> </div> diff --git a/sonar-server/src/test/java/org/sonar/server/issue/DefaultIssueFinderTest.java b/sonar-server/src/test/java/org/sonar/server/issue/DefaultIssueFinderTest.java index 2ea40e04b8b..b3de5336538 100644 --- a/sonar-server/src/test/java/org/sonar/server/issue/DefaultIssueFinderTest.java +++ b/sonar-server/src/test/java/org/sonar/server/issue/DefaultIssueFinderTest.java @@ -90,7 +90,6 @@ public class DefaultIssueFinderTest { assertThat(issue.componentKey()).isEqualTo("Action.java"); assertThat(issue.projectKey()).isEqualTo("struts"); assertThat(issue.ruleKey().toString()).isEqualTo("squid:AvoidCycle"); - assertThat(results.securityExclusions()).isFalse(); } @Test diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/IssueParser.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/IssueParser.java index 537d1ceeb62..855ad83698f 100644 --- a/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/IssueParser.java +++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/IssueParser.java @@ -74,7 +74,6 @@ class IssueParser { Map paging = (Map) jsonRoot.get("paging"); result.setPaging(new Paging(paging)); - result.setSecurityExclusions(JsonUtils.getBoolean(jsonRoot, "securityExclusions")); result.setMaxResultsReached(JsonUtils.getBoolean(jsonRoot, "maxResultsReached")); return result; } diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/Issues.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/Issues.java index ea06ffdf8f7..9dcd5926c94 100644 --- a/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/Issues.java +++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/Issues.java @@ -38,7 +38,6 @@ public class Issues { private final Map<String, Component> componentsByKey = new HashMap<String, Component>(); private final Map<String, Component> projectsByKey = new HashMap<String, Component>(); private Paging paging; - private Boolean securityExclusions; private Boolean maxResultsReached; public List<Issue> list() { @@ -88,10 +87,6 @@ public class Issues { return paging; } - public Boolean securityExclusions() { - return securityExclusions; - } - public Boolean maxResultsReached() { return maxResultsReached; } @@ -126,11 +121,6 @@ public class Issues { return this; } - Issues setSecurityExclusions(Boolean securityExclusions) { - this.securityExclusions = securityExclusions; - return this; - } - Issues setMaxResultsReached(Boolean maxResultsReached) { this.maxResultsReached = maxResultsReached; return this; diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/IssueParserTest.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/IssueParserTest.java index 82dd222875d..7f0a76ecb4d 100644 --- a/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/IssueParserTest.java +++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/IssueParserTest.java @@ -78,7 +78,6 @@ public class IssueParserTest { assertThat(paging.pages()).isEqualTo(1); assertThat(paging.total()).isEqualTo(2); - assertThat(issues.securityExclusions()).isTrue(); assertThat(issues.maxResultsReached()).isTrue(); } @@ -89,6 +88,7 @@ public class IssueParserTest { assertThat(issues).isNotNull(); assertThat(issues.list()).isEmpty(); assertThat(issues.rules()).isEmpty(); + assertThat(issues.maxResultsReached()).isFalse(); } @Test diff --git a/sonar-ws-client/src/test/resources/org/sonar/wsclient/issue/IssueParserTest/empty.json b/sonar-ws-client/src/test/resources/org/sonar/wsclient/issue/IssueParserTest/empty.json index 8f05e1953b7..b3712e0d503 100644 --- a/sonar-ws-client/src/test/resources/org/sonar/wsclient/issue/IssueParserTest/empty.json +++ b/sonar-ws-client/src/test/resources/org/sonar/wsclient/issue/IssueParserTest/empty.json @@ -5,5 +5,5 @@ "total": 0, "pages": 0 }, - "securityExclusions": true + "maxResultsReached": false }
\ No newline at end of file diff --git a/sonar-ws-client/src/test/resources/org/sonar/wsclient/issue/IssueParserTest/issue-with-comments.json b/sonar-ws-client/src/test/resources/org/sonar/wsclient/issue/IssueParserTest/issue-with-comments.json index 4378189dbba..5118aaee009 100644 --- a/sonar-ws-client/src/test/resources/org/sonar/wsclient/issue/IssueParserTest/issue-with-comments.json +++ b/sonar-ws-client/src/test/resources/org/sonar/wsclient/issue/IssueParserTest/issue-with-comments.json @@ -38,6 +38,5 @@ "total": 2, "pages": 1 }, - "securityExclusions": true, "maxResultsReached": false }
\ No newline at end of file diff --git a/sonar-ws-client/src/test/resources/org/sonar/wsclient/issue/IssueParserTest/issue-with-components.json b/sonar-ws-client/src/test/resources/org/sonar/wsclient/issue/IssueParserTest/issue-with-components.json index 37711422340..2f331712d3c 100644 --- a/sonar-ws-client/src/test/resources/org/sonar/wsclient/issue/IssueParserTest/issue-with-components.json +++ b/sonar-ws-client/src/test/resources/org/sonar/wsclient/issue/IssueParserTest/issue-with-components.json @@ -46,6 +46,5 @@ "total": 2, "pages": 1 }, - "securityExclusions": true, "maxResultsReached": false }
\ No newline at end of file diff --git a/sonar-ws-client/src/test/resources/org/sonar/wsclient/issue/IssueParserTest/issue-with-projects.json b/sonar-ws-client/src/test/resources/org/sonar/wsclient/issue/IssueParserTest/issue-with-projects.json index c999362047b..a5e4ea7cd9d 100644 --- a/sonar-ws-client/src/test/resources/org/sonar/wsclient/issue/IssueParserTest/issue-with-projects.json +++ b/sonar-ws-client/src/test/resources/org/sonar/wsclient/issue/IssueParserTest/issue-with-projects.json @@ -54,6 +54,5 @@ "total": 2, "pages": 1 }, - "securityExclusions": true, "maxResultsReached": false }
\ No newline at end of file diff --git a/sonar-ws-client/src/test/resources/org/sonar/wsclient/issue/IssueParserTest/issue-with-users.json b/sonar-ws-client/src/test/resources/org/sonar/wsclient/issue/IssueParserTest/issue-with-users.json index 32d3a8e323f..7d8bc6586a4 100644 --- a/sonar-ws-client/src/test/resources/org/sonar/wsclient/issue/IssueParserTest/issue-with-users.json +++ b/sonar-ws-client/src/test/resources/org/sonar/wsclient/issue/IssueParserTest/issue-with-users.json @@ -52,6 +52,5 @@ "total": 2, "pages": 1 }, - "securityExclusions": true, "maxResultsReached": false }
\ No newline at end of file diff --git a/sonar-ws-client/src/test/resources/org/sonar/wsclient/issue/IssueParserTest/search.json b/sonar-ws-client/src/test/resources/org/sonar/wsclient/issue/IssueParserTest/search.json index 6931c7de92b..55ff5e79e53 100644 --- a/sonar-ws-client/src/test/resources/org/sonar/wsclient/issue/IssueParserTest/search.json +++ b/sonar-ws-client/src/test/resources/org/sonar/wsclient/issue/IssueParserTest/search.json @@ -51,6 +51,5 @@ "total": 2, "pages": 1 }, - "securityExclusions": true, "maxResultsReached": true }
\ No newline at end of file |