You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by li...@apache.org on 2018/03/16 01:48:41 UTC

[incubator-servicecomb-java-chassis] branch master updated: SCB-374 fix NPE when 404 not found

This is an automated email from the ASF dual-hosted git repository.

liubao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-servicecomb-java-chassis.git


The following commit(s) were added to refs/heads/master by this push:
     new aaaaf5b  SCB-374 fix NPE when 404 not found
aaaaf5b is described below

commit aaaaf5b82fbe1b51383e432db62ef7747734fde0
Author: wujimin <wu...@huawei.com>
AuthorDate: Fri Mar 16 08:57:39 2018 +0800

    SCB-374 fix NPE when 404 not found
---
 .../org/apache/servicecomb/common/rest/AbstractRestInvocation.java  | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/common/common-rest/src/main/java/org/apache/servicecomb/common/rest/AbstractRestInvocation.java b/common/common-rest/src/main/java/org/apache/servicecomb/common/rest/AbstractRestInvocation.java
index 3932f1b..3dfb5cc 100644
--- a/common/common-rest/src/main/java/org/apache/servicecomb/common/rest/AbstractRestInvocation.java
+++ b/common/common-rest/src/main/java/org/apache/servicecomb/common/rest/AbstractRestInvocation.java
@@ -196,7 +196,11 @@ public abstract class AbstractRestInvocation {
           e);
     } finally {
       requestEx.getAsyncContext().complete();
-      invocation.onFinish(response);
+      // if failed to locate path, then will not create invocation
+      // TODO: statistics this case
+      if (invocation != null) {
+        invocation.onFinish(response);
+      }
     }
   }
 

-- 
To stop receiving notification emails like this one, please contact
liubao@apache.org.