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:07:11 UTC
[GitHub] [shardingsphere] terrymanu commented on a diff in pull request #17464: Support for configuring Props of primitive types
terrymanu commented on code in PR #17464:
URL: https://github.com/apache/shardingsphere/pull/17464#discussion_r868120045
##########
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:
It has already converted in `TypedSPIRegistry.convertToStringTypedProperties()`.
It is better to use props.getProperty to get the value here.
--
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