You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Deepthi Devaki A R (JIRA)" <ji...@apache.org> on 2008/01/28 14:31:40 UTC
[jira] Assigned: (DERBY-3338) CancelQueryTask.forgetContext() could
be simplified.
[ https://issues.apache.org/jira/browse/DERBY-3338?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Deepthi Devaki A R reassigned DERBY-3338:
-----------------------------------------
Assignee: Deepthi Devaki A R
> 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: Deepthi Devaki A R
> Priority: Minor
>
> 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.