Open psdutkiewicz opened 4 years ago
@psdutkiewicz - this repository represents azure-cosmosdb version 2.x.x v4 cosmos SDK is located here : https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/cosmos/azure-cosmos which version of SDK are you using, since 4.0.1 is not released yet.
@kushagraThapar Of course I made a mistake and made an issue in wrong repo... Sorry for that.
Nevertheless, here is the same issue. Of course, default Locale can be set by user to properly parse double to string, but I think this code should not depend on user Locale settings.
Describe the bug Calling
CosmosAsyncContainer.queryItems()
withFeedOptions.isPopulateQueryMetrics() == true
producesjava.lang.NumberFormatException
To Reproduce Call
CosmosAsyncContainer.queryItems()
withFeedOptions.isPopulateQueryMetrics() == true
Expected behavior Should parse metrics.
Actual behavior
java.lang.NumberFormatException
is thrownEnvironment summary SDK Version: 4.0.1 Java JDK version: 11 OS Version: Win10
Additional context Adding
Locale.US
intoString.format()
should fix this issue.https://github.com/Azure/azure-cosmosdb-java/blob/5fe53f7a1920e42568b150aaa58af0f8ceabe0b4/gateway/src/main/java/com/microsoft/azure/cosmosdb/rx/internal/query/DocumentProducer.java#L91