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 2019/10/30 07:29:28 UTC

[GitHub] [incubator-shardingsphere] zjcnb opened a new issue #3408: Is there redundant code in ShardingProperties class?

zjcnb opened a new issue #3408: Is there redundant code in ShardingProperties class?
URL: https://github.com/apache/incubator-shardingsphere/issues/3408
 
 
   Hi everyone,
        I hava a suggestion,validate() methond in ShardingProperties class。 Part of code can remove?Because,Is there no long.class in ShardingPropertiesConstant 。The following code:
   
          String value = props.getProperty(each);
               if (type == boolean.class && !StringUtil.isBooleanValue(value)) {
                   errorMessages.add(getErrorMessage(shardingPropertiesConstant, value));
               } else if (type == int.class && !StringUtil.isIntValue(value)) {
                   errorMessages.add(getErrorMessage(shardingPropertiesConstant, value));
               } else if (type == long.class && !StringUtil.isLongValue(value)) {
                   errorMessages.add(getErrorMessage(shardingPropertiesConstant, value));
               }
   
   

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


With regards,
Apache Git Services