You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Jody Grassel (JIRA)" <ji...@apache.org> on 2012/09/10 17:52:07 UTC
[jira] [Work started] (OPENJPA-2260) Parenthesis-augmented
parameters are improperly processed at EM level
[ https://issues.apache.org/jira/browse/OPENJPA-2260?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Work on OPENJPA-2260 started by Jody Grassel.
> Parenthesis-augmented parameters are improperly processed at EM level
> ---------------------------------------------------------------------
>
> Key: OPENJPA-2260
> URL: https://issues.apache.org/jira/browse/OPENJPA-2260
> Project: OpenJPA
> Issue Type: Bug
> Components: jpa
> Affects Versions: 2.1.0, 2.1.1, 2.2.0
> Reporter: Jody Grassel
> Assignee: Jody Grassel
>
> 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.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira