You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2021/06/28 16:34:32 UTC

[GitHub] [dolphinscheduler] kyoty opened a new issue #5710: [Improvement][ALERT-LOG] The usage of Preconditions.checkState in Guava is wrong

kyoty opened a new issue #5710:
URL: https://github.com/apache/dolphinscheduler/issues/5710


   
   The usage of Preconditions.checkState in Guava is wrong, the placeholder should use the form of %s instead of {}
   like this: [DolphinPluginLoader.java#L107](https://github.com/apache/dolphinscheduler/blob/3d8d1ebe67cc3331ff5fda649675b5c61a04df5f/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/plugin/DolphinPluginLoader.java#L107)
   ```java
   private void loadPlugin(URLClassLoader pluginClassLoader) {
           ServiceLoader<DolphinSchedulerPlugin> serviceLoader = ServiceLoader.load(DolphinSchedulerPlugin.class, pluginClassLoader);
           List<DolphinSchedulerPlugin> plugins = ImmutableList.copyOf(serviceLoader);
           Preconditions.checkState(!plugins.isEmpty(), "No service providers the plugin {}",DolphinSchedulerPlugin.class.getName());
           for (DolphinSchedulerPlugin plugin : plugins) {
               logger.info("Installing {}", plugin.getClass().getName());
               for (AbstractDolphinPluginManager dolphinPluginManager : dolphinPluginManagerList) {
                   dolphinPluginManager.installPlugin(plugin);
               }
           }
       }
   ```
   we can reproduce this like this simple sample:
   ```java
   public class Test {
       public static void main(String[] args) {
           String word = "letters";
           checkState(word.isEmpty(), "Alert Plugin {} is not null", word);
       }
   }
   ```
   the result is:
   **Alert Plugin {} is not null [letters]**
   but we actually want to show the message like this:
   **Alert Plugin letters is not null**


-- 
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: commits-unsubscribe@dolphinscheduler.apache.org

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



[GitHub] [dolphinscheduler] github-actions[bot] commented on issue #5710: [Improvement][ALERT-LOG] The usage of Preconditions.checkState in Guava is wrong

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on issue #5710:
URL: https://github.com/apache/dolphinscheduler/issues/5710#issuecomment-869833340


   Hi:
   * Thank you for your feedback, we have received your issue, Please wait patiently for a reply.
   * In order for us to understand your request as soon as possible, please provide detailed information、version or pictures.
   * If you haven't received a reply for a long time, you can subscribe to the developer's email,Mail subscription steps reference https://dolphinscheduler.apache.org/zh-cn/community/development/subscribe.html ,Then write the issue URL in the email content and send question to dev@dolphinscheduler.apache.org.


-- 
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: commits-unsubscribe@dolphinscheduler.apache.org

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



[GitHub] [dolphinscheduler] CalvinKirs closed issue #5710: [Improvement][ALERT-LOG] The usage of Preconditions.checkState in Guava is wrong

Posted by GitBox <gi...@apache.org>.
CalvinKirs closed issue #5710:
URL: https://github.com/apache/dolphinscheduler/issues/5710


   


-- 
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: commits-unsubscribe@dolphinscheduler.apache.org

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



[GitHub] [dolphinscheduler] github-actions[bot] commented on issue #5710: [Improvement][ALERT-LOG] The usage of Preconditions.checkState in Guava is wrong

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on issue #5710:
URL: https://github.com/apache/dolphinscheduler/issues/5710#issuecomment-869833340


   Hi:
   * Thank you for your feedback, we have received your issue, Please wait patiently for a reply.
   * In order for us to understand your request as soon as possible, please provide detailed information、version or pictures.
   * If you haven't received a reply for a long time, you can subscribe to the developer's email,Mail subscription steps reference https://dolphinscheduler.apache.org/zh-cn/community/development/subscribe.html ,Then write the issue URL in the email content and send question to dev@dolphinscheduler.apache.org.


-- 
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: commits-unsubscribe@dolphinscheduler.apache.org

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



[GitHub] [dolphinscheduler] CalvinKirs closed issue #5710: [Improvement][ALERT-LOG] The usage of Preconditions.checkState in Guava is wrong

Posted by GitBox <gi...@apache.org>.
CalvinKirs closed issue #5710:
URL: https://github.com/apache/dolphinscheduler/issues/5710


   


-- 
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: commits-unsubscribe@dolphinscheduler.apache.org

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