db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kahat...@apache.org
Subject svn commit: r827035 - in /db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile: BinaryComparisonOperatorNode.java UnaryComparisonOperatorNode.java
Date Tue, 20 Oct 2009 11:19:38 GMT
Author: kahatlen
Date: Tue Oct 20 11:19:37 2009
New Revision: 827035

URL: http://svn.apache.org/viewvc?rev=827035&view=rev
Log:
DERBY-4412: Make getNegation() abstract in BinaryComparisonOperatorNode and UnaryComparisonOperatorNode

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BinaryComparisonOperatorNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/UnaryComparisonOperatorNode.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BinaryComparisonOperatorNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BinaryComparisonOperatorNode.java?rev=827035&r1=827034&r2=827035&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BinaryComparisonOperatorNode.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BinaryComparisonOperatorNode.java
Tue Oct 20 11:19:37 2009
@@ -33,8 +33,6 @@
 import org.apache.derby.iapi.reference.ClassName;
 import org.apache.derby.iapi.error.StandardException;
 
-import org.apache.derby.iapi.services.sanity.SanityManager;
-
 import org.apache.derby.impl.sql.compile.ActivationClassBuilder;
 
 import java.util.Vector;
@@ -334,19 +332,9 @@
 	 *
 	 * @exception StandardException		Thrown on error
 	 */
-	BinaryOperatorNode getNegation(ValueNode leftOperand,
+	abstract BinaryOperatorNode getNegation(ValueNode leftOperand,
 										  ValueNode rightOperand)
-				throws StandardException
-	{
-		/* 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;
-	}
+				throws StandardException;
 
 	/**
 	 * Finish putting an expression into conjunctive normal

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/UnaryComparisonOperatorNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/UnaryComparisonOperatorNode.java?rev=827035&r1=827034&r2=827035&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/UnaryComparisonOperatorNode.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/UnaryComparisonOperatorNode.java
Tue Oct 20 11:19:37 2009
@@ -53,7 +53,7 @@
  *
  */
 
-public class UnaryComparisonOperatorNode extends UnaryOperatorNode
+public abstract class UnaryComparisonOperatorNode extends UnaryOperatorNode
 {
 	/**
 	 * Bind this comparison operator.  All that has to be done for binding
@@ -138,18 +138,8 @@
 	 *
 	 * @exception StandardException		Thrown on error
 	 */
-	UnaryOperatorNode getNegation(ValueNode operand)
-				throws StandardException
-	{
-		/* 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;
-	}
+	abstract UnaryOperatorNode getNegation(ValueNode operand)
+				throws StandardException;
 
 	/* RelationalOperator interface */
 



Mime
View raw message