You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2021/01/11 01:19:14 UTC

[GitHub] [servicecomb-java-chassis] liubao68 commented on issue #2187: 调用微服务偶发性失败

liubao68 commented on issue #2187:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2187#issuecomment-757581019


   这个异常结合代码不应该抛出,你可以看下 ResponseMapperFactorys 代码:
   
   ```
     public MAPPER createResponseMapper(Type providerType) {
       for (ResponseMapperFactory<MAPPER> factory : factorys) {
         if (!factory.isMatch(providerType)) {
           continue;
         }
   
         return factory.createResponseMapper(this, providerType);
       }
   
       throw new IllegalStateException(
           String.format("can not find response mapper for %s, this should never happened.",
               providerType.getTypeName()));
     }
   ```
   
   `DefaultProducerResponseMapperFactory` 可以保证永远不会走到异常分支。 你可以调试下代码,看看实际情况。 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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