spring-data-redis icon indicating copy to clipboard operation
spring-data-redis copied to clipboard

Duplicate code in StringToPropertiesConverter class

Open wendy512 opened this issue 4 months ago • 1 comments

public class StringToPropertiesConverter implements Converter<String, Properties> {

	@Override
	public Properties convert(String source) {

		Properties info = new Properties();
		try (StringReader stringReader = new StringReader(source)) {
			info.load(stringReader);
		} catch (Exception ex) {
			throw new RedisSystemException("Cannot read Redis info", ex);
		}
		return info;
	}
}

Converting String type content into Properties has been defined in org.springframework.data.redis.connection.convert.Converters. Can I try to optimize and submit a PR?

wendy512 avatar Oct 12 '24 07:10 wendy512