ilene 2002/07/22 11:34:15
Modified: java/src/org/apache/xalan/templates
RedundentExprEliminator.java
Log:
Applied patch from Morris Kwan for bugzilla #9753.
The bug addresses the problem that there is a build error with Xalan under
JDK 1.4, because one of the classes uses assert() as method name.
And assert is a keyword in JDK 1.4. The patch just changes the word "assert"
to "assertion".
Revision Changes Path
1.4 +9 -9
xml-xalan/java/src/org/apache/xalan/templates/RedundentExprEliminator.java
Index: RedundentExprEliminator.java
===================================================================
RCS file:
/home/cvs/xml-xalan/java/src/org/apache/xalan/templates/RedundentExprEliminator.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- RedundentExprEliminator.java 7 Jun 2002 17:13:54 -0000 1.3
+++ RedundentExprEliminator.java 22 Jul 2002 18:34:15 -0000 1.4
@@ -407,7 +407,7 @@
}
}
- assert(false, "Could not find common ancestor!!!");
+ assertion(false, "Could not find common ancestor!!!");
return null;
}
@@ -497,7 +497,7 @@
AxesWalker walker = wi.getFirstWalker();
for(int i = 0; i < numSteps; i++)
{
- assert(null != walker, "Walker should not be null!");
+ assertion(null != walker, "Walker should not be null!");
walker = walker.getNextWalker();
}
@@ -579,7 +579,7 @@
aw2 = aw2.getNextWalker();
}
- assert((null != aw1) || (null != aw2), "Total match is incorrect!");
+ assertion((null != aw1) || (null != aw2), "Total match is incorrect!");
return true;
}
@@ -1311,21 +1311,21 @@
LocPathIterator path)
throws RuntimeException
{
- assert(owner.getExpression() == path, "owner.getExpression() !=
path!!!");
+ assertion(owner.getExpression() == path, "owner.getExpression() !=
path!!!");
int n = paths.size();
// There should never be any duplicates in the list!
for(int i = 0; i < n; i++)
{
ExpressionOwner ew = (ExpressionOwner)paths.elementAt(i);
- assert(ew != owner, "duplicate owner on the list!!!");
- assert(ew.getExpression() != path, "duplicate expression on the
list!!!");
+ assertion(ew != owner, "duplicate owner on the list!!!");
+ assertion(ew.getExpression() != path, "duplicate expression on
the list!!!");
}
}
/**
* Simple assertion.
*/
- protected static void assert(boolean b, String msg)
+ protected static void assertion(boolean b, String msg)
{
if(!b)
{
@@ -1363,7 +1363,7 @@
MultistepExprHolder(ExpressionOwner exprOwner, int stepCount,
MultistepExprHolder next)
{
m_exprOwner = exprOwner;
- assert(null != m_exprOwner, "exprOwner can not be null!");
+ assertion(null != m_exprOwner, "exprOwner can not be null!");
m_stepCount = stepCount;
m_next = next;
}
@@ -1433,7 +1433,7 @@
next = next.m_next;
}
- assert(false, "unlink failed!!!");
+ assertion(false, "unlink failed!!!");
return null;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]