From dev-return-7882-apmail-openjpa-dev-archive=openjpa.apache.org@openjpa.apache.org Sun Apr 20 19:11:38 2008 Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 49080 invoked from network); 20 Apr 2008 19:11:38 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 20 Apr 2008 19:11:38 -0000 Received: (qmail 21474 invoked by uid 500); 20 Apr 2008 19:11:39 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 21451 invoked by uid 500); 20 Apr 2008 19:11:39 -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 21442 invoked by uid 99); 20 Apr 2008 19:11:39 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 20 Apr 2008 12:11:39 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 20 Apr 2008 19:11:04 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 6D18C234C0E6 for ; Sun, 20 Apr 2008 12:08:21 -0700 (PDT) Message-ID: <956485262.1208718501431.JavaMail.jira@brutus> Date: Sun, 20 Apr 2008 12:08:21 -0700 (PDT) From: "Michael Dick (JIRA)" To: dev@openjpa.apache.org Subject: [jira] Closed: (OPENJPA-442) JIRA-407 introduced backward compatibility problem in QueryImpl In-Reply-To: <13441040.1195066483252.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/OPENJPA-442?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Michael Dick closed OPENJPA-442. -------------------------------- Resolution: Fixed > JIRA-407 introduced backward compatibility problem in QueryImpl > --------------------------------------------------------------- > > Key: OPENJPA-442 > URL: https://issues.apache.org/jira/browse/OPENJPA-442 > Project: OpenJPA > Issue Type: Bug > Components: query > Affects Versions: 1.1.0, 1.2.0 > Reporter: Teresa Kan > Assignee: Michael Dick > Fix For: 1.2.0 > > Attachments: OPENJPA-442.patch > > > In the openjpa-407 patch, it changed the constructor to pass an extra parameter RuntimeExceptionTransaltor, > public QueryImpl(EntityManagerImpl em, RuntimeExceptionTranslator ret, > org.apache.openjpa.kernel.Query query) { > _em = em; > _query = new DelegatingQuery(query, ret); > } > However, it did not keep the orginial constructor so the extension of this QueryImpl from other vendor resulted in compiler error. We need to keep the backward compatibilty issue in mind when we change the public interface. > The solution will be to add the original constructor back and route it to the new constructor: > public QueryImpl(EntityManagerImpl em, RuntimeExceptionTranslator ret, > org.apache.openjpa.kernel.Query query) { > _em = em; > if (ret == null) > ret = PersistenceExceptions.getRollbackTranslator(em); > _query = new DelegatingQuery(query, ret); > } > /** > * Constructor; supply factory and delegate. > */ > public QueryImpl(EntityManagerImpl em, org.apache.openjpa.kernel.Query query) { > this(em, null, query); > } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.