geirm 01/05/20 14:14:32
Modified: src/java/org/apache/velocity/runtime/parser/node
ASTSetDirective.java
src/java/org/apache/velocity/test EventHandlingTestCase.java
src/java/org/apache/velocity/test/misc Test.java
Log:
support for change to NullSetEventHandler
Revision Changes Path
1.18 +2 -2
jakarta-velocity/src/java/org/apache/velocity/runtime/parser/node/ASTSetDirective.java
Index: ASTSetDirective.java
===================================================================
RCS file:
/home/cvs/jakarta-velocity/src/java/org/apache/velocity/runtime/parser/node/ASTSetDirective.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- ASTSetDirective.java 2001/05/20 19:50:06 1.17
+++ ASTSetDirective.java 2001/05/20 21:14:32 1.18
@@ -73,7 +73,7 @@
*
* @author <a href="mailto:[EMAIL PROTECTED]">Jason van Zyl</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Geir Magnusson Jr.</a>
- * @version $Id: ASTSetDirective.java,v 1.17 2001/05/20 19:50:06 geirm Exp $
+ * @version $Id: ASTSetDirective.java,v 1.18 2001/05/20 21:14:32 geirm Exp $
*/
public class ASTSetDirective extends SimpleNode
{
@@ -154,7 +154,7 @@
*/
if (ec != null)
{
- doit = ec.nullSetLogMessage( left.literal() );
+ doit = ec.shouldLogOnNullSet( left.literal(), right.literal() );
}
if (doit)
1.3 +3 -3
jakarta-velocity/src/java/org/apache/velocity/test/EventHandlingTestCase.java
Index: EventHandlingTestCase.java
===================================================================
RCS file:
/home/cvs/jakarta-velocity/src/java/org/apache/velocity/test/EventHandlingTestCase.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- EventHandlingTestCase.java 2001/05/20 19:49:29 1.2
+++ EventHandlingTestCase.java 2001/05/20 21:14:32 1.3
@@ -74,7 +74,7 @@
* Tests event handling
*
* @author <a href="mailto:[EMAIL PROTECTED]">Geir Magnusson Jr.</a>
- * @version $Id: EventHandlingTestCase.java,v 1.2 2001/05/20 19:49:29 geirm Exp $
+ * @version $Id: EventHandlingTestCase.java,v 1.3 2001/05/20 21:14:32 geirm Exp $
*/
public class EventHandlingTestCase extends TestCase implements
ReferenceInsertionEventHandler,
NullSetEventHandler,
MethodExceptionEventHandler,
@@ -316,9 +316,9 @@
* a log message. This method gives the application
* a chance to 'vote' on msg generation
*/
- public boolean nullSetLogMessage( String reference )
+ public boolean shouldLogOnNullSet( String lhs, String rhs )
{
- if (reference.equals("$settest"))
+ if (lhs.equals("$settest"))
return false;
return true;
1.30 +4 -4
jakarta-velocity/src/java/org/apache/velocity/test/misc/Test.java
Index: Test.java
===================================================================
RCS file:
/home/cvs/jakarta-velocity/src/java/org/apache/velocity/test/misc/Test.java,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- Test.java 2001/05/20 19:49:31 1.29
+++ Test.java 2001/05/20 21:14:32 1.30
@@ -95,7 +95,7 @@
*
* @author <a href="mailto:[EMAIL PROTECTED]">Jason van Zyl</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Geir Magnusson Jr.</a>
- * @version $Id: Test.java,v 1.29 2001/05/20 19:49:31 geirm Exp $
+ * @version $Id: Test.java,v 1.30 2001/05/20 21:14:32 geirm Exp $
*/
public class Test implements ReferenceInsertionEventHandler,
NullSetEventHandler,
@@ -300,11 +300,11 @@
return value;
}
- public boolean nullSetLogMessage( String reference )
+ public boolean shouldLogOnNullSet( String lhs, String rhs )
{
- System.out.println("Woo2! nullSetLogMessage : " + reference);
+ System.out.println("Woo2! nullSetLogMessage : " + lhs + " : RHS = " + rhs);
- if (reference.equals("$woogie"))
+ if (lhs.equals("$woogie"))
return false;
return true;