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 2022/05/09 15:20:07 UTC

[GitHub] [shardingsphere] Ahoo-Wang commented on a diff in pull request #17464: Support for configuring Props of primitive types

Ahoo-Wang commented on code in PR #17464:
URL: https://github.com/apache/shardingsphere/pull/17464#discussion_r868134409


##########
shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-plugin/shardingsphere-sharding-cosid/src/main/java/org/apache/shardingsphere/sharding/cosid/algorithm/keygen/CosIdKeyGenerateAlgorithm.java:
##########
@@ -46,7 +46,7 @@ public final class CosIdKeyGenerateAlgorithm implements KeyGenerateAlgorithm {
     public void init(final Properties props) {
         this.props = props;
         lazyIdGenerator = new LazyIdGenerator(props.getProperty(CosIdAlgorithmConstants.ID_NAME_KEY, IdGeneratorProvider.SHARE));
-        asString = Boolean.parseBoolean(props.getProperty(AS_STRING_KEY, Boolean.FALSE.toString()));

Review Comment:
   Ok! I found it. 
   However, `Properties` does not have such a convention that the value content must be set to a string type.
   So developers should be informed of such a convention in the `SPIPostProcessor.init` method comment.



-- 
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@shardingsphere.apache.org

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