Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 46158 invoked from network); 11 Jun 2008 04:37:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 11 Jun 2008 04:37:06 -0000 Received: (qmail 10162 invoked by uid 500); 11 Jun 2008 04:37:08 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 10137 invoked by uid 500); 11 Jun 2008 04:37:08 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 10124 invoked by uid 99); 11 Jun 2008 04:37:08 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Jun 2008 21:37:08 -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; Wed, 11 Jun 2008 04:36:27 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 13C68234C138 for ; Tue, 10 Jun 2008 21:36:45 -0700 (PDT) Message-ID: <1792149016.1213159005079.JavaMail.jira@brutus> Date: Tue, 10 Jun 2008 21:36:45 -0700 (PDT) From: "Mamta A. Satoor (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Resolved: (DERBY-3338) CancelQueryTask.forgetContext() could be simplified. In-Reply-To: <31744788.1200956314640.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/DERBY-3338?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Mamta A. Satoor resolved DERBY-3338. ------------------------------------ Resolution: Fixed Fix Version/s: 10.5.0.0 Thanks, Dag, for the review. I have committed the changes into trunk with revision 666519. > CancelQueryTask.forgetContext() could be simplified. > ---------------------------------------------------- > > Key: DERBY-3338 > URL: https://issues.apache.org/jira/browse/DERBY-3338 > Project: Derby > Issue Type: Improvement > Components: Newcomer, Services, SQL > Reporter: Daniel John Debrunner > Assignee: Mamta A. Satoor > Priority: Minor > Fix For: 10.5.0.0 > > Attachments: DERBY_3338_rework_forgetContext_v1.diff > > > Minor issue but CancelQueryTask.forgetContext() has this code (in GenericStatementContext.java) > public void forgetContext() { > boolean mayStillRun = !cancel(); > if (mayStillRun) { > synchronized (this) { > statementContext = null; > } > } > } > The mayStillRun = !cancel() is somewhat confusing. I can't see from the javadoc of TimerTask.cancel() how its return value could indicate the task may still run. > Less confusing code could be: > public void forgetContext() { > synchronized (this) { > statementContext = null; > } > cancel(); > } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.