morten      01/10/22 02:33:38

  Modified:    java/src/org/apache/xalan/xsltc/compiler LogicalExpr.java
  Log:
  Fix for logical expressions that have combinations of not() and "and".
  PR:           bugzilla 2351
  Obtained from:        n/a
  Submitted by: [EMAIL PROTECTED]
  Reviewed by:  [EMAIL PROTECTED]
  
  Revision  Changes    Path
  1.7       +9 -4      
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/LogicalExpr.java
  
  Index: LogicalExpr.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/LogicalExpr.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- LogicalExpr.java  2001/06/19 10:44:10     1.6
  +++ LogicalExpr.java  2001/10/22 09:33:38     1.7
  @@ -1,5 +1,5 @@
   /*
  - * @(#)$Id: LogicalExpr.java,v 1.6 2001/06/19 10:44:10 morten Exp $
  + * @(#)$Id: LogicalExpr.java,v 1.7 2001/10/22 09:33:38 morten Exp $
    *
    * The Apache Software License, Version 1.1
    *
  @@ -183,8 +183,11 @@
            // The true-list of OR must point to second clause of AND.
            if ((_left instanceof LogicalExpr) &&
                (((LogicalExpr)_left).getOp() == OR)) {
  -             ((LogicalExpr)_left).backPatchTrueList(middle);
  +             _left.backPatchTrueList(middle);
            }
  +         else if (_left instanceof NotCall) {
  +             _left.backPatchTrueList(middle);
  +         }
            else {
                _trueList.append(_left._trueList);
            }
  @@ -193,12 +196,14 @@
            // The true-list of OR must point to true-list of AND.
            if ((_right instanceof LogicalExpr) &&
                (((LogicalExpr)_right).getOp() == OR)) {
  -             ((LogicalExpr)_right).backPatchTrueList(after);
  +             _right.backPatchTrueList(after);
  +         }
  +         else if (_right instanceof NotCall) {
  +             _right.backPatchTrueList(after);
            }
            else {
                _trueList.append(_right._trueList);
            }
  -
        } 
        // Compile OR-expression
        else {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to