Details
-
Bug
-
Resolution: Duplicate
-
Major
-
None
-
1.1.3
-
Security Level: Public
-
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.
Attachments
Issue Links
- duplicates
-
JCBC-288 Query.setKey() does not parse properly string that starts with number but contains letter
- Resolved