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 "Knut Anders Hatlen (JIRA)" <ji...@apache.org> on 2009/10/20 13:21:59 UTC

[jira] Closed: (DERBY-4412) Make getNegation() abstract in BinaryComparisonOperatorNode and UnaryComparisonOperatorNode

     [ https://issues.apache.org/jira/browse/DERBY-4412?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Knut Anders Hatlen closed DERBY-4412.
-------------------------------------

          Resolution: Fixed
       Fix Version/s: 10.6.0.0
    Issue & fix info:   (was: [Patch Available])

Committed revision 827035.

> Make getNegation() abstract in BinaryComparisonOperatorNode and UnaryComparisonOperatorNode
> -------------------------------------------------------------------------------------------
>
>                 Key: DERBY-4412
>                 URL: https://issues.apache.org/jira/browse/DERBY-4412
>             Project: Derby
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 10.6.0.0
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>            Priority: Trivial
>             Fix For: 10.6.0.0
>
>         Attachments: abstract.diff
>
>
> Both BinaryComparisonOperatorNode and UnaryComparisonOperatorNode have a method called getNegation() with the following code:
> 		/* Keep the compiler happy - this method should never be called.
> 		 * We should always be calling the method in a sub-class.
> 		 */
> 		if (SanityManager.DEBUG)
> 		SanityManager.ASSERT(false,
> 					"expected to call getNegation() for subclass " +
> 					getClass().toString());
> 		return this;
> Instead of relying on asserts to detect missing method overrides at run-time, we should make the methods abstract so that such errors are detected by the compiler.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.