azure-sdk-for-java
azure-sdk-for-java copied to clipboard
Locale consistency: Some APIs use getBytes() and some use getBytes("UTF-8")
Dev estimate: 0.5 Test estimate: 0.5
In .../services/serviceBus/implementation/BrokerPropertiesMapper.java, we have this code:
return mapper.readValue(value.getBytes(), BrokerProperties.class);
This is inconsistent from the rest of the uses of getBytes in the SDK, which always specify UTF-8 encoding. When no encoding is specified, the "platform's default charset" is used.
This could lead to problems, because this means that the behavior of the BrokerPropertiesMapper is dependent on the platform settings, while the rest of the SDK is invariant.
https://github.com/gcheng/azure-sdk-for-java/pull/35
this fix should be good, no test needed