Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 1.1.3
-
Fix Version/s: None
-
Component/s: library
-
Security Level: Public
-
Labels:None
Description
If a key of "3abc" is passed in to a setKey for a view query, it will convert this into just 3.
Looking at /src/main/java/com/couchbase/client/protocol/views/Query.java:558
it looks like NumberFormat.getInstance().parse(value.toString()).toString(); will convert 3abc to 3.
This is because NumberFormat.parse is define to "Parses text from the beginning of the given string to produce a number. The method may not use the entire text of the given string." so if the string starts with a number it will not fail out and just be used as a string.
Looking at /src/main/java/com/couchbase/client/protocol/views/Query.java:558
it looks like NumberFormat.getInstance().parse(value.toString()).toString(); will convert 3abc to 3.
This is because NumberFormat.parse is define to "Parses text from the beginning of the given string to produce a number. The method may not use the entire text of the given string." so if the string starts with a number it will not fail out and just be used as a string.
Activity
- All
- Comments
- Work Log
- History
- Activity
- Gerrit Reviews