[ 
https://issues.apache.org/jira/browse/SCB-762?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16551435#comment-16551435
 ] 

ASF GitHub Bot commented on SCB-762:
------------------------------------

WillemJiang closed pull request #823: [SCB-762] resolve eclipse compile warnings
URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/823
 
 
   

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/foundations/foundation-common/src/main/java/org/apache/servicecomb/foundation/common/utils/JvmUtils.java
 
b/foundations/foundation-common/src/main/java/org/apache/servicecomb/foundation/common/utils/JvmUtils.java
index bb02d725e..e6315e9f3 100644
--- 
a/foundations/foundation-common/src/main/java/org/apache/servicecomb/foundation/common/utils/JvmUtils.java
+++ 
b/foundations/foundation-common/src/main/java/org/apache/servicecomb/foundation/common/utils/JvmUtils.java
@@ -72,7 +72,7 @@ private static String readFromJar(String mainClassOrJar) {
       return mainClassOrJar;
     }
 
-    String manifestUri = "jar:file:/" + new 
File(mainClassOrJar).getAbsolutePath() + "!/" + JarFile.MANIFEST_NAME;
+    String manifestUri = "jar:file:" + new 
File(mainClassOrJar).getAbsolutePath() + "!/" + JarFile.MANIFEST_NAME;
 
     try {
       URL url = new URL(manifestUri);
diff --git 
a/foundations/foundation-common/src/test/java/org/apache/servicecomb/foundation/common/net/TestNetUtils.java
 
b/foundations/foundation-common/src/test/java/org/apache/servicecomb/foundation/common/net/TestNetUtils.java
index 8766b847e..a9f8fba66 100644
--- 
a/foundations/foundation-common/src/test/java/org/apache/servicecomb/foundation/common/net/TestNetUtils.java
+++ 
b/foundations/foundation-common/src/test/java/org/apache/servicecomb/foundation/common/net/TestNetUtils.java
@@ -18,7 +18,6 @@
 package org.apache.servicecomb.foundation.common.net;
 
 import java.io.IOException;
-import java.lang.reflect.Field;
 import java.net.InetAddress;
 import java.net.ServerSocket;
 import java.util.HashMap;
@@ -108,7 +107,7 @@ public void testCanTcpListenYes() throws IOException {
 
     Assert.assertTrue(NetUtils.canTcpListen(address, port));
   }
-  
+
   @Test
   public void testGetHostName() {
     Assert.assertNotEquals(null, NetUtils.getHostName());
diff --git 
a/foundations/foundation-common/src/test/java/org/apache/servicecomb/foundation/common/utils/TestJvmUtils.java
 
b/foundations/foundation-common/src/test/java/org/apache/servicecomb/foundation/common/utils/TestJvmUtils.java
index 257c8f407..97a616dd7 100644
--- 
a/foundations/foundation-common/src/test/java/org/apache/servicecomb/foundation/common/utils/TestJvmUtils.java
+++ 
b/foundations/foundation-common/src/test/java/org/apache/servicecomb/foundation/common/utils/TestJvmUtils.java
@@ -89,7 +89,7 @@ public void findMainClass_jar_normal() throws Exception {
     URL url = PowerMockito.mock(URL.class);
 
     String command = "a.jar";
-    String manifestUri = "jar:file:/" + new File(command).getAbsolutePath() + 
"!/" + JarFile.MANIFEST_NAME;
+    String manifestUri = "jar:file:" + new File(command).getAbsolutePath() + 
"!/" + JarFile.MANIFEST_NAME;
 
     PowerMockito.whenNew(URL.class).withParameterTypes(String.class)
         .withArguments(manifestUri).thenReturn(url);
diff --git 
a/handlers/handler-bizkeeper/src/main/java/org/apache/servicecomb/bizkeeper/CustomizeCommandGroupKey.java
 
b/handlers/handler-bizkeeper/src/main/java/org/apache/servicecomb/bizkeeper/CustomizeCommandGroupKey.java
index c80e926f1..79183b718 100644
--- 
a/handlers/handler-bizkeeper/src/main/java/org/apache/servicecomb/bizkeeper/CustomizeCommandGroupKey.java
+++ 
b/handlers/handler-bizkeeper/src/main/java/org/apache/servicecomb/bizkeeper/CustomizeCommandGroupKey.java
@@ -24,7 +24,7 @@
 import com.netflix.hystrix.util.InternMap;
 
 /**
- * 
ͨ������CommandGroupKey��Ŀ����Я��Invocation���־�̬��Ϣ������CircutBreakerEvent��ȡ��
+ * 通过定制CommandGroupKey,目的是携带Invocation部分静态信息,便于CircutBreakerEvent获取
  */
 public class CustomizeCommandGroupKey extends HystrixKey.HystrixKeyDefault 
implements HystrixCommandGroupKey {
 
@@ -34,13 +34,14 @@ public CustomizeCommandGroupKey(String key) {
     super(key);
   }
 
-  private static final InternMap<String, CustomizeCommandGroupKey> intern = 
new InternMap<String, CustomizeCommandGroupKey>(
-      new InternMap.ValueConstructor<String, CustomizeCommandGroupKey>() {
-        @Override
-        public CustomizeCommandGroupKey create(String key) {
-          return new CustomizeCommandGroupKey(key);
-        }
-      });
+  private static final InternMap<String, CustomizeCommandGroupKey> intern =
+      new InternMap<String, CustomizeCommandGroupKey>(
+          new InternMap.ValueConstructor<String, CustomizeCommandGroupKey>() {
+            @Override
+            public CustomizeCommandGroupKey create(String key) {
+              return new CustomizeCommandGroupKey(key);
+            }
+          });
 
   public static HystrixCommandGroupKey asKey(String key, Invocation 
invocation) {
     CustomizeCommandGroupKey result = intern.interned(key);
diff --git 
a/handlers/handler-loadbalance/src/main/java/org/apache/servicecomb/loadbalance/ServiceCombServer.java
 
b/handlers/handler-loadbalance/src/main/java/org/apache/servicecomb/loadbalance/ServiceCombServer.java
index b544a7514..1d4edf331 100644
--- 
a/handlers/handler-loadbalance/src/main/java/org/apache/servicecomb/loadbalance/ServiceCombServer.java
+++ 
b/handlers/handler-loadbalance/src/main/java/org/apache/servicecomb/loadbalance/ServiceCombServer.java
@@ -17,8 +17,6 @@
 
 package org.apache.servicecomb.loadbalance;
 
-import java.util.concurrent.atomic.AtomicInteger;
-
 import org.apache.servicecomb.core.Endpoint;
 import org.apache.servicecomb.core.Transport;
 import 
org.apache.servicecomb.serviceregistry.api.registry.MicroserviceInstance;
diff --git 
a/handlers/handler-loadbalance/src/test/java/org/apache/servicecomb/loadbalance/TestLoadBalanceHandler2.java
 
b/handlers/handler-loadbalance/src/test/java/org/apache/servicecomb/loadbalance/TestLoadBalanceHandler2.java
index b640ce295..8a2916737 100644
--- 
a/handlers/handler-loadbalance/src/test/java/org/apache/servicecomb/loadbalance/TestLoadBalanceHandler2.java
+++ 
b/handlers/handler-loadbalance/src/test/java/org/apache/servicecomb/loadbalance/TestLoadBalanceHandler2.java
@@ -133,7 +133,6 @@ public void 
testZoneAwareAndIsolationFilterWorks(@Injectable Invocation invocati
     LoadbalanceHandler handler = null;
     LoadBalancer loadBalancer = null;
     ServiceCombServer server = null;
-    boolean failed = false;
 
     handler = new LoadbalanceHandler();
     loadBalancer = handler.getOrCreateLoadBalancer(invocation);
diff --git 
a/handlers/handler-loadbalance/src/test/java/org/apache/servicecomb/loadbalance/TestLoadbalanceHandler.java
 
b/handlers/handler-loadbalance/src/test/java/org/apache/servicecomb/loadbalance/TestLoadbalanceHandler.java
index 2302d8224..faa86f961 100644
--- 
a/handlers/handler-loadbalance/src/test/java/org/apache/servicecomb/loadbalance/TestLoadbalanceHandler.java
+++ 
b/handlers/handler-loadbalance/src/test/java/org/apache/servicecomb/loadbalance/TestLoadbalanceHandler.java
@@ -38,12 +38,10 @@
 import org.apache.servicecomb.foundation.test.scaffolding.config.ArchaiusUtils;
 import org.apache.servicecomb.serviceregistry.RegistryUtils;
 import org.apache.servicecomb.serviceregistry.ServiceRegistry;
-import org.apache.servicecomb.serviceregistry.api.registry.DataCenterInfo;
 import 
org.apache.servicecomb.serviceregistry.api.registry.MicroserviceInstance;
 import org.apache.servicecomb.serviceregistry.cache.CacheEndpoint;
 import org.apache.servicecomb.serviceregistry.cache.InstanceCacheManager;
 import org.apache.servicecomb.serviceregistry.discovery.DiscoveryFilter;
-import org.apache.servicecomb.serviceregistry.discovery.DiscoveryTreeNode;
 import org.apache.servicecomb.swagger.invocation.AsyncResponse;
 import org.apache.servicecomb.swagger.invocation.Response;
 import org.hamcrest.Matchers;
@@ -78,8 +76,6 @@
 
   Map<String, LoadBalancerCreator> loadBalancerMap;
 
-  private LoadBalancerCreator loadBalancerCreator = new 
LoadBalancerCreator(rule, "test");
-
   @Injectable
   Invocation invocation;
 
diff --git 
a/service-registry/src/test/java/org/apache/servicecomb/serviceregistry/diagnosis/instance/TestInstanceCacheCheckTask.java
 
b/service-registry/src/test/java/org/apache/servicecomb/serviceregistry/diagnosis/instance/TestInstanceCacheCheckTask.java
index 862cf6fad..bed55da34 100644
--- 
a/service-registry/src/test/java/org/apache/servicecomb/serviceregistry/diagnosis/instance/TestInstanceCacheCheckTask.java
+++ 
b/service-registry/src/test/java/org/apache/servicecomb/serviceregistry/diagnosis/instance/TestInstanceCacheCheckTask.java
@@ -117,7 +117,7 @@ public void onChecked(InstanceCacheSummary 
instanceCacheSummary) {
   @Test
   public void autoTask_clearOldTask() {
     Holder<Boolean> cancelResult = new Holder<>();
-    ScheduledFuture<?> scheduledFuture = new MockUp<ScheduledFuture>() {
+    ScheduledFuture<?> scheduledFuture = new MockUp<ScheduledFuture<?>>() {
       @Mock
       boolean cancel(boolean mayInterruptIfRunning) {
         cancelResult.value = true;


 

----------------------------------------------------------------
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:
us...@infra.apache.org


> resolve eclipse compile warnings
> --------------------------------
>
>                 Key: SCB-762
>                 URL: https://issues.apache.org/jira/browse/SCB-762
>             Project: Apache ServiceComb
>          Issue Type: Task
>          Components: Java-Chassis
>            Reporter: wujimin
>            Assignee: wujimin
>            Priority: Major
>             Fix For: java-chassis-1.0.0
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to