Return-Path: X-Original-To: apmail-openjpa-dev-archive@www.apache.org Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C54C7DB9C for ; Mon, 10 Sep 2012 15:52:08 +0000 (UTC) Received: (qmail 14441 invoked by uid 500); 10 Sep 2012 15:52:08 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 14366 invoked by uid 500); 10 Sep 2012 15:52:07 -0000 Mailing-List: contact dev-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@openjpa.apache.org Delivered-To: mailing list dev@openjpa.apache.org Received: (qmail 14337 invoked by uid 99); 10 Sep 2012 15:52:07 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Sep 2012 15:52:07 +0000 Date: Tue, 11 Sep 2012 02:52:07 +1100 (NCT) From: "Jody Grassel (JIRA)" To: dev@openjpa.apache.org Message-ID: <767640305.58286.1347292327545.JavaMail.jiratomcat@arcas> Subject: [jira] [Created] (OPENJPA-2260) Parenthesis-augmented parameters are improperly processed at EM level MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Jody Grassel created OPENJPA-2260: ------------------------------------- Summary: 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.2.0, 2.1.1, 2.1.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