OpenJPA
  1. OpenJPA
  2. OPENJPA-2260

Parenthesis-augmented parameters are improperly processed at EM level

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.1.0, 2.1.1, 2.2.0
    • Fix Version/s: 2.1.2, 2.2.1, 2.3.0
    • Component/s: jpa
    • Labels:
      None

      Description

      The processing of properties for the creation of an EntityManager do not properly handle simple value types that can be augmented by parenthesized configuration options.

      For example,

      Map propMap = new HashMap();
      propMap.put("openjpa.jdbc.QuerySQLCache", "true(EnableStatistics=true)");
      EntityManager em = emf.createEntityManager(propMap);

      actually results in the creation of an EntityManager instance where the Query SQL Cache is disabled. This is because the entire value, "true(EnableStatistics=true)" is passed into Strings.parse() which returns the result of a Boolean.valueOf() operation. Since "true" doesn't match "true(EnableStatistics=true)", the call to parse() returns false - so in this case, the QuerySQLCache property is set to false causing it to be disabled for that instance of EntityManager.

        Activity

        Jody Grassel created issue -
        Jody Grassel made changes -
        Field Original Value New Value
        Status Open [ 1 ] In Progress [ 3 ]
        Jody Grassel made changes -
        Status In Progress [ 3 ] Resolved [ 5 ]
        Fix Version/s 2.1.2 [ 12317142 ]
        Fix Version/s 2.3.0 [ 12319463 ]
        Fix Version/s 2.2.1 [ 12319943 ]
        Resolution Fixed [ 1 ]
        Jody Grassel made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open In Progress In Progress
        40s 1 Jody Grassel 10/Sep/12 16:51
        In Progress In Progress Resolved Resolved
        2d 23h 21m 1 Jody Grassel 13/Sep/12 16:13
        Resolved Resolved Closed Closed
        6s 1 Jody Grassel 13/Sep/12 16:13

          People

          • Assignee:
            Jody Grassel
            Reporter:
            Jody Grassel
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development