geirm 01/05/17 07:05:31
Modified: src/java/org/apache/velocity/context EventCartridge.java
Log:
Removed the NullReference event stuff - it's redundant - the functionality
is completely and clearly covered by the ReferenceInsertion event handling
care
Revision Changes Path
1.2 +2 -35
jakarta-velocity/src/java/org/apache/velocity/context/EventCartridge.java
Index: EventCartridge.java
===================================================================
RCS file:
/home/cvs/jakarta-velocity/src/java/org/apache/velocity/context/EventCartridge.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- EventCartridge.java 2001/04/20 04:29:28 1.1
+++ EventCartridge.java 2001/05/17 14:05:26 1.2
@@ -64,16 +64,14 @@
*
* @author <a href="mailto:[EMAIL PROTECTED]">Geir Magnusson Jr.</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Jose Alberto Fernandez</a>
- * @version $Id: EventCartridge.java,v 1.1 2001/04/20 04:29:28 geirm Exp $
+ * @version $Id: EventCartridge.java,v 1.2 2001/05/17 14:05:26 geirm Exp $
*/
public class EventCartridge implements ReferenceInsertionEventHandler,
NullSetEventHandler,
- NullReferenceEventHandler,
MethodExceptionEventHandler
{
private ReferenceInsertionEventHandler rieh = null;
private NullSetEventHandler nseh = null;
- private NullReferenceEventHandler nreh = null;
private MethodExceptionEventHandler meeh = null;
/**
@@ -98,13 +96,7 @@
rieh = (ReferenceInsertionEventHandler) ev;
found = true;
}
-
- if ( ev instanceof NullReferenceEventHandler )
- {
- nreh = (NullReferenceEventHandler) ev;
- found = true;
- }
-
+
if ( ev instanceof NullSetEventHandler )
{
nseh = (NullSetEventHandler) ev;
@@ -149,12 +141,6 @@
found = true;
}
- if (ev == nreh)
- {
- nreh = null;
- found = true;
- }
-
if (ev == meeh)
{
meeh = null;
@@ -206,25 +192,6 @@
return nseh.nullSetLogMessage( reference );
}
- /**
- * Implementation of NullReferenceEventHandler method
- * <code>nullReferenceRender()</code>.
- *
- * Called during Velocity merge if a reference is null
- *
- * @param reference reference from template about to be inserted
- * @return Object to render into output, or null if normal behavior is desired
- */
- public Object nullReferenceRender( String reference )
- {
- if (nreh == null)
- {
- return reference;
- }
-
- return nreh.nullReferenceRender( reference );
- }
-
/**
* Implementation of MethodExceptionEventHandler method
* <code>methodException()</code>.