You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2021/03/31 13:47:12 UTC

[GitHub] [shardingsphere] sandynz opened a new pull request #9891: Fix issue : SHOW SHARDING RULE throw NullPointerException when keyGenerateStrategy and default strategy is not configured

sandynz opened a new pull request #9891:
URL: https://github.com/apache/shardingsphere/pull/9891


   Fixes #9865.
   
   Changes proposed in this pull request:
   - SHOW SHARDING RULE throw NullPointerException when keyGenerateStrategy and default strategy is not configured
   


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



[GitHub] [shardingsphere] sandynz commented on pull request #9891: Fix issue : SHOW SHARDING RULE throw NullPointerException when keyGenerateStrategy and default strategy is not configured

Posted by GitBox <gi...@apache.org>.
sandynz commented on pull request #9891:
URL: https://github.com/apache/shardingsphere/pull/9891#issuecomment-811958507


   Yes, it will be more concise


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



[GitHub] [shardingsphere] tristaZero edited a comment on pull request #9891: Fix issue : SHOW SHARDING RULE throw NullPointerException when keyGenerateStrategy and default strategy is not configured

Posted by GitBox <gi...@apache.org>.
tristaZero edited a comment on pull request #9891:
URL: https://github.com/apache/shardingsphere/pull/9891#issuecomment-811926759


   ```java
   private String generateKeyGenerateStrategy(final ShardingRuleConfiguration ruleConfig, final KeyGenerateStrategyConfiguration keyGenerateStrategy) {
           return null == ruleConfig ? "" : "column:" + keyGenerateStrategy.getColumn() + " " + (new Gson()).toJson(ruleConfig.getKeyGenerators().get(keyGenerateStrategy.getKeyGeneratorName()));
       }
   ```
   Hi @sandynz do you think that will be more concise?


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



[GitHub] [shardingsphere] tristaZero edited a comment on pull request #9891: Fix issue : SHOW SHARDING RULE throw NullPointerException when keyGenerateStrategy and default strategy is not configured

Posted by GitBox <gi...@apache.org>.
tristaZero edited a comment on pull request #9891:
URL: https://github.com/apache/shardingsphere/pull/9891#issuecomment-811926759


   ```java
   private String generateKeyGenerateStrategy(final ShardingRuleConfiguration ruleConfig, final KeyGenerateStrategyConfiguration keyGenerateStrategy) {
           return null == ruleConfig ? "" : "column:" + keyGenerateStrategy.getColumn() + " " + (new Gson()).toJson(ruleConfig.getKeyGenerators().get(keyGenerateStrategy.getKeyGeneratorName()));
       }


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



[GitHub] [shardingsphere] tristaZero commented on pull request #9891: Fix issue : SHOW SHARDING RULE throw NullPointerException when keyGenerateStrategy and default strategy is not configured

Posted by GitBox <gi...@apache.org>.
tristaZero commented on pull request #9891:
URL: https://github.com/apache/shardingsphere/pull/9891#issuecomment-811926759


   private String generateKeyGenerateStrategy(final ShardingRuleConfiguration ruleConfig, final KeyGenerateStrategyConfiguration keyGenerateStrategy) {
           return null == ruleConfig ? "" : "column:" + keyGenerateStrategy.getColumn() + " " + (new Gson()).toJson(ruleConfig.getKeyGenerators().get(keyGenerateStrategy.getKeyGeneratorName()));
       }


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



[GitHub] [shardingsphere] tristaZero merged pull request #9891: Fix issue : SHOW SHARDING RULE throw NullPointerException when keyGenerateStrategy and default strategy is not configured

Posted by GitBox <gi...@apache.org>.
tristaZero merged pull request #9891:
URL: https://github.com/apache/shardingsphere/pull/9891


   


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