You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2021/07/14 05:19:06 UTC

[GitHub] [dubbo] JdjzV commented on a change in pull request #8272: optimize unstandard code

JdjzV commented on a change in pull request #8272:
URL: https://github.com/apache/dubbo/pull/8272#discussion_r668403757



##########
File path: dubbo-common/src/test/java/org/apache/dubbo/config/context/ConfigManagerTest.java
##########
@@ -267,7 +267,7 @@ public void testConfigMode() {
                 getConfigManager().addConfig(applicationConfig2);
                 fail("strict mode cannot add two application configs");
             } catch (Exception e) {
-                assertEquals(IllegalStateException.class, e.getClass());

Review comment:
       @BurningCN 
   Thanks for your reply.
   I modify the try-catch block in write mothod ahead. If I don't modify this test case, the test will not pass.
   ```java
          try {
               writeLock.lock();
               value = callable.call();
           } catch (RuntimeException e) {
               throw e;
           } catch (Throwable e) {
               throw new RuntimeException(e.getCause());
           }
   ```
   to 
   ```java
          try {
               writeLock.lock();
               value = callable.call();
           } catch (Throwable e) {
               throw new RuntimeException(e);
           }
   ```
   I modify code in this place because there is only one catch block in the read method.
   Does the change is wrong?




-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org