]> source.dussan.org Git - sonarqube.git/commitdiff
Automatic merge from branch-5.6
authorssjenka <ssjenka@ops-slave-centos7-1.internal.sonarsource.com>
Wed, 1 Jun 2016 07:53:21 +0000 (09:53 +0200)
committerssjenka <ssjenka@ops-slave-centos7-1.internal.sonarsource.com>
Wed, 1 Jun 2016 07:53:21 +0000 (09:53 +0200)
* origin/branch-5.6:
  Deprecate SonarPlugin in favour of Plugin
  SONAR-7681 Use public implementation of List in MyBatis
  SONAR-7681 WS api/ce/activity requires administer permissions when searching with a task id
  SONAR-7669 WS api/issues/search createdBefore cannot be equal to createdAfter

1  2 
server/sonar-server/src/main/java/org/sonar/server/issue/index/IssueIndex.java
server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueIndexTest.java

index 6f16aab83b52200fc1365f0c6cab7e2fc88e024e,f221cb380baf0342353ea1061873693e25260613..24289e2b7b087257418cde9cb789d105b3f0bc1a
@@@ -370,11 -380,11 +370,11 @@@ public class IssueIndex extends BaseInd
    private void validateCreationDateBounds(Date createdBefore, Date createdAfter) {
      Preconditions.checkArgument(createdAfter == null || createdAfter.before(new Date(system.now())),
        "Start bound cannot be in the future");
-     Preconditions.checkArgument(createdAfter == null || createdAfter.equals(createdBefore) || createdBefore == null || createdAfter.before(createdBefore),
-       "Start bound cannot be larger than end bound");
+     Preconditions.checkArgument(createdAfter == null || createdBefore == null || createdAfter.before(createdBefore),
+       "Start bound cannot be larger or equal to end bound");
    }
  
 -  private void configureStickyFacets(IssueQuery query, SearchOptions options, Map<String, FilterBuilder> filters, QueryBuilder esQuery, SearchRequestBuilder esSearch) {
 +  private void configureStickyFacets(IssueQuery query, SearchOptions options, Map<String, QueryBuilder> filters, QueryBuilder esQuery, SearchRequestBuilder esSearch) {
      if (!options.getFacets().isEmpty()) {
        StickyFacetBuilder stickyFacetBuilder = newStickyFacetBuilder(query, filters, esQuery);
        // Execute Term aggregations
index a715a73e76184a0024193edc9194e35f42cf2bf2,981540f98c76fb1f0dc129d3abd0b50de3d50c91..b26b02857226976c20fe543742c246ccce189b82
@@@ -29,10 -29,11 +29,11 @@@ import java.util.Map
  import java.util.TimeZone;
  import javax.annotation.Nullable;
  import org.assertj.core.api.Fail;
 +import org.elasticsearch.test.ESTestCase;
  import org.junit.Before;
 -import org.junit.ClassRule;
  import org.junit.Rule;
  import org.junit.Test;
+ import org.junit.rules.ExpectedException;
  import org.sonar.api.config.Settings;
  import org.sonar.api.issue.Issue;
  import org.sonar.api.resources.Scopes;
@@@ -66,11 -67,12 +67,13 @@@ import static org.sonar.api.utils.DateU
  
  public class IssueIndexTest {
  
 -  @ClassRule
 -  public static EsTester tester = new EsTester().addDefinitions(new IssueIndexDefinition(new Settings()), new ViewIndexDefinition(new Settings()));
 +  @Rule
 +  public EsTester tester = new EsTester(new IssueIndexDefinition(new Settings()), new ViewIndexDefinition(new Settings()));
 +
    @Rule
    public UserSessionRule userSessionRule = UserSessionRule.standalone();
+   @Rule
+   public ExpectedException expectedException = ExpectedException.none();
  
    IssueIndex underTest;