]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-7587 end of support of Java 7
authorSimon Brandhof <simon.brandhof@sonarsource.com>
Thu, 26 May 2016 13:32:55 +0000 (15:32 +0200)
committerSimon Brandhof <simon.brandhof@sonarsource.com>
Thu, 26 May 2016 13:52:00 +0000 (15:52 +0200)
- Upgrade to parent 34, which compiles
  with java 8 and disable javadoc lints

- Compilation with java 8 on Travis

- Fix ambiguities in assertJ

.travis.yml
pom.xml
server/sonar-server/src/test/java/org/sonar/server/issue/IssueUpdaterTest.java
server/sonar-server/src/test/java/org/sonar/server/search/BaseDocTest.java

index f3b0b5e83b610c435fdea26e07383629dc031a1e..eb304c809d2632a2247f8006adf844193b14ed78 100644 (file)
@@ -1,7 +1,7 @@
 language: java
 sudo: false
 install: true
-jdk: oraclejdk7
+jdk: oraclejdk8
 script: ./travis.sh
 
 env:
diff --git a/pom.xml b/pom.xml
index 8385b4f9ac605ed7a9d6804aadce97512df696fd..2896622c35cc475ca1777fbb47ace21b7ff1c775 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
   <parent>
     <groupId>org.sonarsource.parent</groupId>
     <artifactId>parent</artifactId>
-    <version>31</version>
+    <version>34</version>
   </parent>
   <groupId>org.sonarsource.sonarqube</groupId>
   <artifactId>sonarqube</artifactId>
@@ -74,7 +74,6 @@
 
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
     <maven.min.version>3.2</maven.min.version>
-    <jdk.min.version>1.7</jdk.min.version>
     <timestamp>${maven.build.timestamp}</timestamp>
     <maven.build.timestamp.format>yyyy-MM-dd'T'HH:mm:ssZ</maven.build.timestamp.format>
     <license.title>SonarQube</license.title>
       <dependency>
         <groupId>org.assertj</groupId>
         <artifactId>assertj-core</artifactId>
-        <version>2.0.0</version>
+        <version>3.4.1</version>
       </dependency>
       <dependency>
         <groupId>org.assertj</groupId>
         <artifactId>assertj-guava</artifactId>
-        <version>1.3.1</version>
+        <version>3.0.0</version>
       </dependency>
       <dependency>
         <groupId>xpp3</groupId>
             <artifactId>maven-enforcer-plugin</artifactId>
             <executions>
               <execution>
-                <id>enforce-java7</id>
+                <id>enforce-java8</id>
                 <goals>
                   <goal>enforce</goal>
                 </goals>
                     <requireJavaVersion>
                       <message>To release this project JDK ${jdk.min.version} is required.
                       </message>
-                      <version>[1.7,)</version>
+                      <version>[${jdk.min.version},)</version>
                     </requireJavaVersion>
                   </rules>
                 </configuration>
index 2c35227264dedadfc26fe0b944455d035c42131d..a7c94979f0a086487d5298c34b8a2b781766b119 100644 (file)
@@ -250,7 +250,7 @@ public class IssueUpdaterTest {
     issue.setLocations("[1-3]");
     boolean updated = updater.setLocations(issue, "[1-4]");
     assertThat(updated).isTrue();
-    assertThat(issue.getLocations()).isEqualTo("[1-4]");
+    assertThat(issue.getLocations().toString()).isEqualTo("[1-4]");
     assertThat(issue.currentChange()).isNull();
     assertThat(issue.mustSendNotifications()).isFalse();
   }
@@ -260,7 +260,7 @@ public class IssueUpdaterTest {
     issue.setLocations("[1-3]");
     boolean updated = updater.setLocations(issue, "[1-3]");
     assertThat(updated).isFalse();
-    assertThat(issue.getLocations()).isEqualTo("[1-3]");
+    assertThat(issue.getLocations().toString()).isEqualTo("[1-3]");
     assertThat(issue.currentChange()).isNull();
     assertThat(issue.mustSendNotifications()).isFalse();
   }
@@ -270,7 +270,7 @@ public class IssueUpdaterTest {
     issue.setLocations(null);
     boolean updated = updater.setLocations(issue, "[1-4]");
     assertThat(updated).isTrue();
-    assertThat(issue.getLocations()).isEqualTo("[1-4]");
+    assertThat(issue.getLocations().toString()).isEqualTo("[1-4]");
     assertThat(issue.currentChange()).isNull();
     assertThat(issue.mustSendNotifications()).isFalse();
   }
index 53bea5371f3587d84545c94de4e61bf79b61144d..d694b16ff18308b1ae706e02d7b45c30eecc1fb3 100644 (file)
@@ -40,9 +40,9 @@ public class BaseDocTest {
     BaseDoc doc = new BaseDoc(fields) {
     };
 
-    assertThat(doc.getNullableField("a_string")).isEqualTo("foo");
-    assertThat(doc.getNullableField("a_int")).isEqualTo(42);
-    assertThat(doc.getNullableField("a_null")).isNull();
+    assertThat((String) doc.getNullableField("a_string")).isEqualTo("foo");
+    assertThat((int) doc.getNullableField("a_int")).isEqualTo(42);
+    assertThat((String) doc.getNullableField("a_null")).isNull();
   }
 
   @Test
@@ -61,7 +61,7 @@ public class BaseDocTest {
 
   @Test
   public void getFieldAsDate() {
-    BaseDoc doc = new BaseDoc(Maps.<String,Object>newHashMap()) {
+    BaseDoc doc = new BaseDoc(Maps.newHashMap()) {
     };
     long now = System.currentTimeMillis();
     doc.setField("javaDate", new Date(now));
@@ -73,7 +73,7 @@ public class BaseDocTest {
 
   @Test
   public void getNullableFieldAsDate() {
-    BaseDoc doc = new BaseDoc(Maps.<String,Object>newHashMap()) {
+    BaseDoc doc = new BaseDoc(Maps.newHashMap()) {
     };
     long now = System.currentTimeMillis();
     doc.setField("javaDate", new Date(now));