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/19 14:27:31 UTC

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

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


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.


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

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-4412?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Knut Anders Hatlen updated DERBY-4412:
--------------------------------------

    Issue & fix info: [Patch Available]

All the regression tests passed.

> 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
>         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.


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

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
     [ 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.


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

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-4412?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Knut Anders Hatlen updated DERBY-4412:
--------------------------------------

    Attachment: abstract.diff

The attached patch makes the two methods abstract. Also, the UnaryComparisonOperatorNode class had to be made abstract. BinaryComparisonOperatorNode was already abstract. I've started the regression tests.

> 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
>         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.