Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.4.1
    • Fix Version/s: 2.4.2, 3.0.0
    • Component/s: None
    • Labels:
      None

      Description

      In openjpa there are classes which is not using proper toLower()/toUpper(). The issue is that if the server relies on the default locale and if the process was started with some non English compatible locale such as Turkish, toUpper/Lower will yield an incorrect result. For instance "URI".toLowerCase() will result in "urı" instead of "uri". The same applies to toUpperCase -> "uri".toUpperCase() will become "URİ" and checks like "string.toUpperCase().equals(someConstant)" will fail.

      Classes:
      AbstractMetaDataDefaults:220
      ConfigurationImpl:842
      DBIdentifierUtilImpl:309
      JDBCConfigurationImpl:987
      JDBCStoreQuery:812,815,818,821,823
      OracleDictionary:794
      PersistenceMetaDataDefaults:243
      SQLFormatter:169

        Activity

        Hide
        ilgrosso Francesco Chicchiriccò added a comment -

        Bulk close for 2.4.2

        Show
        ilgrosso Francesco Chicchiriccò added a comment - Bulk close for 2.4.2
        Hide
        struberg Mark Struberg added a comment -

        using Locale.ENGLISH for all sql spec related parts. I did NOT touch any code which works on attribute or table names or values as those might be locale specific.

        I'm closing this ticket for now as it surely improves the handling. For any further changes we would probably need to introduce a way to configure the locale which should be used for e.g.

        • attribute and table names
        • values

        But even that might theoretically be not enough as 1 table might store turkish text and another an english one. If you like to go down that rabbit hole then feel free to open a follow-up ticket which refers to this one.

        Show
        struberg Mark Struberg added a comment - using Locale.ENGLISH for all sql spec related parts. I did NOT touch any code which works on attribute or table names or values as those might be locale specific. I'm closing this ticket for now as it surely improves the handling. For any further changes we would probably need to introduce a way to configure the locale which should be used for e.g. attribute and table names values But even that might theoretically be not enough as 1 table might store turkish text and another an english one. If you like to go down that rabbit hole then feel free to open a follow-up ticket which refers to this one.
        Hide
        struberg Mark Struberg added a comment -

        A few things should hardcoded use Locale.ENGLISH. E.g. all the configuration and spec parts.
        I'm not sure though whether we can apply english to for example attribute names as well.

        Fixed so far:

        • JDBCConfigurationImpl
        • ConfigurationImpl
        • DBCPDriverDataSource
        • Schemas
        • DBDictionaryFactory
        • IdentifierUtilImpl
        • various DbDictionaries
        Show
        struberg Mark Struberg added a comment - A few things should hardcoded use Locale.ENGLISH. E.g. all the configuration and spec parts. I'm not sure though whether we can apply english to for example attribute names as well. Fixed so far: JDBCConfigurationImpl ConfigurationImpl DBCPDriverDataSource Schemas DBDictionaryFactory IdentifierUtilImpl various DbDictionaries

          People

          • Assignee:
            struberg Mark Struberg
            Reporter:
            kal0ian Kaloyan Spiridonov
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development