OData Spec specifies that Double.PositiveInfinity and Double.NegativeInfinity should be encoded as "INF" and "-INF" respectively.
http://download.microsoft.com/download/9/5/E/95EF66AF-9026-4BB0-A41D-A4F81802D92C/[MS-ODATA].pdf
The C# API follows the OData spec; however, the Java API uses Double.parseDouble.
https://github.com/Azure/azure-sdk-for-java/blob/master/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/table/client/EntityProperty.java#L275
When reading either "INF" or "-INF" out of the CloudTable using the Java API it throws:
java.lang.NumberFormatException: For input string: "INF"
This is particularly inconvenient when reading values out using the Java API, that were inserted using the C# API. The NumberFormatException is thrown when .hasNext is called on the LazySegmentedIterator when the row contains a EntityProperty that is a Double with either infinity value. This prevents the entire row from being read, even the valid values - without doing a TableQuery with a Select defined with valid property names. It is impossible to get the Double value out of the CloudTable.
Stack Trace:
Caused by: java.lang.NumberFormatException: For input string: "INF"
at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1241)
at java.lang.Double.parseDouble(Double.java:540)
at com.microsoft.windowsazure.services.table.client.EntityProperty.getValueAsDouble(EntityProperty.java:275)
at com.microsoft.windowsazure.services.table.client.EntityProperty.<init>(EntityProperty.java:150)
at com.microsoft.windowsazure.services.table.client.AtomPubParser.readProperties(AtomPubParser.java:377)
at com.microsoft.windowsazure.services.table.client.AtomPubParser.parseEntity(AtomPubParser.java:123)
at com.microsoft.windowsazure.services.table.client.AtomPubParser.parseResponse(AtomPubParser.java:257)
at com.microsoft.windowsazure.services.table.client.CloudTableClient.executeQuerySegmentedCore(CloudTableClient.java:821)
at com.microsoft.windowsazure.services.table.client.CloudTableClient$4.execute(CloudTableClient.java:976)
at com.microsoft.windowsazure.services.table.client.CloudTableClient$4.execute(CloudTableClient.java:970)
at com.microsoft.windowsazure.services.core.storage.utils.implementation.ExecutionEngine.executeWithRetry(ExecutionEngine.java:114)
at com.microsoft.windowsazure.services.core.storage.utils.implementation.LazySegmentedIterator.hasNext(LazySegmentedIterator.java:109)
Please let me know if you would like me to submit a pull request to rectify this issue.
OData Spec specifies that Double.PositiveInfinity and Double.NegativeInfinity should be encoded as "INF" and "-INF" respectively.
http://download.microsoft.com/download/9/5/E/95EF66AF-9026-4BB0-A41D-A4F81802D92C/[MS-ODATA].pdf
The C# API follows the OData spec; however, the Java API uses Double.parseDouble.
https://github.com/Azure/azure-sdk-for-java/blob/master/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/table/client/EntityProperty.java#L275
When reading either "INF" or "-INF" out of the CloudTable using the Java API it throws:
java.lang.NumberFormatException: For input string: "INF"This is particularly inconvenient when reading values out using the Java API, that were inserted using the C# API. The NumberFormatException is thrown when .hasNext is called on the LazySegmentedIterator when the row contains a EntityProperty that is a Double with either infinity value. This prevents the entire row from being read, even the valid values - without doing a TableQuery with a Select defined with valid property names. It is impossible to get the Double value out of the CloudTable.
Stack Trace:
Please let me know if you would like me to submit a pull request to rectify this issue.