xue2lang opened a new issue #13405:
URL: https://github.com/apache/shardingsphere/issues/13405
## Question
why use not use Properties.put(key,value) instead of
Properties.setProperty(key,value), because setProperty() method only support
String value, when vlaue is Map , Map.toString() (result is k1=v1, k2=v2) have
the equal sign,when we use JSON parse the value from Properties in the
implementation class for SPI will occur error
```java
private static <T extends TypedSPI> void setProperties(final T service,
final Properties props) {
if (null == props) {
return;
}
Properties newProps = new Properties();
//why use not use Properties.put(key,value)
props.forEach((key, value) -> newProps.setProperty(key.toString(),
null == value ? null : value.toString()));
service.setProps(newProps);
}
```
**For English only**, other languages will not accept.
Before asking a question, make sure you have:
- Googled your question.
- Searched open and closed [GitHub
issues](https://github.com/apache/shardingsphere/issues).
- Read documentation: [ShardingSphere
Doc](https://shardingsphere.apache.org/document/current/en/overview).
Please pay attention on issues you submitted, because we maybe need more
details.
If no response anymore and we cannot reproduce it on current information, we
will **close it**.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]