Solr
  1. Solr
  2. SOLR-704

improve NumberFormatTransformers handling of invalid input

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.3
    • Fix Version/s: 1.3
    • Labels:
      None

      Description

      As described in http://www.ibm.com/developerworks/java/library/j-numberformat/ instances of the NumberFormat class don't throw ParseExceptions in all cases of invalid input. This affects the org.apache.solr.handler.dataimport.NumberFormatTransformer class which relies on NumberFormat. I will attach a patch to demonstrate and fix this issue shortly.

      1. SOLR-704.patch
        7 kB
        Stefan Oestreicher
      2. SOLR-704.patch
        5 kB
        Stefan Oestreicher

        Activity

        Hide
        Stefan Oestreicher added a comment -

        This is a diff against r686094

        Show
        Stefan Oestreicher added a comment - This is a diff against r686094
        Hide
        Stefan Oestreicher added a comment -

        I updated the patch according to the latest changes in trunk. This is a diff against trunk 686186. I also added another test to demonstrate that "124,,789" or "123,45" parse without failure (with and without the fix).

        Show
        Stefan Oestreicher added a comment - I updated the patch according to the latest changes in trunk. This is a diff against trunk 686186. I also added another test to demonstrate that "124,,789" or "123,45" parse without failure (with and without the fix).
        Hide
        Shalin Shekhar Mangar added a comment -

        Changing issue type to bug because the current behavior can silently ignore part of the string leading to invalid/incomplete data with no notification to the user.

        Show
        Shalin Shekhar Mangar added a comment - Changing issue type to bug because the current behavior can silently ignore part of the string leading to invalid/incomplete data with no notification to the user.
        Hide
        Shalin Shekhar Mangar added a comment -

        Committed revision 686196.

        Thanks Stefan!

        Show
        Shalin Shekhar Mangar added a comment - Committed revision 686196. Thanks Stefan!

          People

          • Assignee:
            Shalin Shekhar Mangar
            Reporter:
            Stefan Oestreicher
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development