You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@dubbo.apache.org by GitBox <gi...@apache.org> on 2018/04/10 03:47:52 UTC

[GitHub] lovepoem closed pull request #1575: [dubbo-1521]add java 9 in travis yml

lovepoem closed pull request #1575: [dubbo-1521]add java 9 in travis yml
URL: https://github.com/apache/incubator-dubbo/pull/1575
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/.travis.yml b/.travis.yml
index 101cb297a7..e774ec5681 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -2,12 +2,12 @@ language: java
 sudo: false # faster builds
 
 jdk:
+    - oraclejdk9
     - oraclejdk8
     - openjdk7
 
 script:
     - travis_wait 30 mvn clean package
-    - travis_wait 30 mvn cobertura:cobertura
 
 after_success:
   - bash <(curl -s https://codecov.io/bash)
diff --git a/dubbo-common/src/main/java/com/alibaba/dubbo/common/utils/ReflectUtils.java b/dubbo-common/src/main/java/com/alibaba/dubbo/common/utils/ReflectUtils.java
index 88f4516a00..f9a8bba0c0 100644
--- a/dubbo-common/src/main/java/com/alibaba/dubbo/common/utils/ReflectUtils.java
+++ b/dubbo-common/src/main/java/com/alibaba/dubbo/common/utils/ReflectUtils.java
@@ -910,6 +910,9 @@ private static Object getEmptyObject(Class<?> returnType, Map<Class<?>, Object>
                 while (cls != null && cls != Object.class) {
                     Field[] fields = cls.getDeclaredFields();
                     for (Field field : fields) {
+                        if (field.isSynthetic()) {
+                            continue;
+                        }
                         Object property = getEmptyObject(field.getType(), emptyInstances, level + 1);
                         if (property != null) {
                             try {
diff --git a/pom.xml b/pom.xml
index 066f75a493..f7bcffff44 100644
--- a/pom.xml
+++ b/pom.xml
@@ -111,10 +111,10 @@
         <maven_deploy_version>2.8.2</maven_deploy_version>
         <maven_compiler_version>3.6.0</maven_compiler_version>
         <maven_source_version>3.0.1</maven_source_version>
-        <maven_cobertura_version>2.7</maven_cobertura_version>
         <maven_javadoc_version>3.0.0</maven_javadoc_version>
         <maven_jetty_version>6.1.26</maven_jetty_version>
         <maven_checkstyle_version>3.0.0</maven_checkstyle_version>
+        <maven_jacoco_version>0.8.1</maven_jacoco_version>
     </properties>
 
     <modules>
@@ -184,7 +184,6 @@
                 <maven_deploy_version>2.7</maven_deploy_version>
                 <maven_compiler_version>3.1</maven_compiler_version>
                 <maven_source_version>3.0.1</maven_source_version>
-                <maven_cobertura_version>2.7</maven_cobertura_version>
                 <maven_javadoc_version>2.10.1</maven_javadoc_version>
             </properties>
         </profile>
@@ -338,7 +337,7 @@
                 <configuration>
                     <useSystemClassLoader>true</useSystemClassLoader>
                     <forkMode>once</forkMode>
-                    <argLine>${argline}</argLine>
+                    <argLine>${argline} ${jacocoArgLine}</argLine>
                     <systemProperties>
                         <!-- common shared -->
                         <property>
@@ -422,16 +421,27 @@
                 </configuration>
             </plugin>
             <plugin>
-                <groupId>org.codehaus.mojo</groupId>
-                <artifactId>cobertura-maven-plugin</artifactId>
-                <version>${maven_cobertura_version}</version>
-                <configuration>
-                    <formats>
-                        <format>html</format>
-                        <format>xml</format>
-                    </formats>
-                    <check/>
-                </configuration>
+                <groupId>org.jacoco</groupId>
+                <artifactId>jacoco-maven-plugin</artifactId>
+                <version>${maven_jacoco_version}</version>
+                <executions>
+                    <execution>
+                        <id>jacoco-initialize</id>
+                        <goals>
+                            <goal>prepare-agent</goal>
+                        </goals>
+                        <configuration>
+                            <propertyName>jacocoArgLine</propertyName>
+                        </configuration>
+                    </execution>
+                    <execution>
+                        <id>jacoco-site</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>report</goal>
+                        </goals>
+                    </execution>
+                </executions>
             </plugin>
         </plugins>
 


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services