Solr
  1. Solr
  2. SOLR-416

need to audit all methods that might be using default Locale

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      As discussed on the mailing list, there are places in Solr where java methods that rely on the default locale are used to copare input with "constants" ... the specific use case that prompted this bug being string comparison after calling "toUpperCase()" ... this won't do what it should in some Locales...

      http://www.nabble.com/Invalid-value-%27explicit%27-for-echoParams-parameter-tf4837914.html

      we should audit the code as much as possible and try to replace these use cases in a way that will work for everyone....

        Activity

        Hide
        Hoss Man added a comment -

        FWIW: 'grep -r "toUpper|toLower" java webapp' shows 32 places where toUpper or toLower are used ... that's probably where we should start trying to fix things ... there may be other equally heinous Locale aware comparisons being done that don't involve these methods.

        Show
        Hoss Man added a comment - FWIW: 'grep -r "toUpper|toLower" java webapp' shows 32 places where toUpper or toLower are used ... that's probably where we should start trying to fix things ... there may be other equally heinous Locale aware comparisons being done that don't involve these methods.
        Hide
        Yonik Seeley added a comment -

        I personally hate case insensitivity for parameters.... if not explicitly documented and used, or if it was added after Solr 1.2, I'd vote to kill it.

        Character.toLower/toUpper aren't locale aware.
        String.equalsIgnoreCase() uses Character.toLower/toUpper which aren't local aware and would be fine for comparisons against a known string.

        Show
        Yonik Seeley added a comment - I personally hate case insensitivity for parameters.... if not explicitly documented and used, or if it was added after Solr 1.2, I'd vote to kill it. Character.toLower/toUpper aren't locale aware. String.equalsIgnoreCase() uses Character.toLower/toUpper which aren't local aware and would be fine for comparisons against a known string.
        Hide
        Hoss Man added a comment -

        Bulk updating 240 Solr issues to set the Fix Version to "next" per the process outlined in this email...

        http://mail-archives.apache.org/mod_mbox/lucene-dev/201005.mbox/%3Calpine.DEB.1.10.1005251052040.24672@radix.cryptio.net%3E

        Selection criteria was "Unresolved" with a Fix Version of 1.5, 1.6, 3.1, or 4.0. email notifications were suppressed.

        A unique token for finding these 240 issues in the future: hossversioncleanup20100527

        Show
        Hoss Man added a comment - Bulk updating 240 Solr issues to set the Fix Version to "next" per the process outlined in this email... http://mail-archives.apache.org/mod_mbox/lucene-dev/201005.mbox/%3Calpine.DEB.1.10.1005251052040.24672@radix.cryptio.net%3E Selection criteria was "Unresolved" with a Fix Version of 1.5, 1.6, 3.1, or 4.0. email notifications were suppressed. A unique token for finding these 240 issues in the future: hossversioncleanup20100527
        Hide
        Robert Muir added a comment -

        Bulk move 3.2 -> 3.3

        Show
        Robert Muir added a comment - Bulk move 3.2 -> 3.3
        Hide
        Robert Muir added a comment -

        3.4 -> 3.5

        Show
        Robert Muir added a comment - 3.4 -> 3.5
        Hide
        Hoss Man added a comment -

        Bulk changing fixVersion 3.6 to 4.0 for any open issues that are unassigned and have not been updated since March 19.

        Email spam suppressed for this bulk edit; search for hoss20120323nofix36 to identify all issues edited

        Show
        Hoss Man added a comment - Bulk changing fixVersion 3.6 to 4.0 for any open issues that are unassigned and have not been updated since March 19. Email spam suppressed for this bulk edit; search for hoss20120323nofix36 to identify all issues edited
        Hide
        Hoss Man added a comment -

        Removing fix version since this issue hasn't gotten much attention and doesn't appear to be a priority for anyone.

        As always: if someone wants to take on this work they are welcome to do so at any time and the target release can be revisted

        Show
        Hoss Man added a comment - Removing fix version since this issue hasn't gotten much attention and doesn't appear to be a priority for anyone. As always: if someone wants to take on this work they are welcome to do so at any time and the target release can be revisted

          People

          • Assignee:
            Unassigned
            Reporter:
            Hoss Man
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:

              Development