Uploaded image for project: 'Couchbase Java Client'
  1. Couchbase Java Client
  2. JCBC-259

String starting with number converted to number only in setKey for views

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Major
    • None
    • 1.1.3
    • Core
    • 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

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              daschl Michael Nitschinger
              james.mauss James Mauss (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty