Permalink
Browse files

Fixed issue where c.c.CascadeListener was receiving null as the c.c.C…

…ascade parameter.
  • Loading branch information...
1 parent 608cb0b commit 15382ce0650c9ef4d9f738e926cc6325c2494493 @cwensel cwensel committed Feb 17, 2013
Showing with 9 additions and 7 deletions.
  1. +2 −0 CHANGES.txt
  2. +7 −7 cascading-core/src/main/java/cascading/cascade/Cascade.java
View
@@ -2,6 +2,8 @@ Cascading Change Log
2.1.5 [unreleased]
+ Fixed issue where c.c.CascadeListener was receiving null as the c.c.Cascade parameter.
+
2.1.4
Added ability to capture frameworks used in an application via c.p.AppProps.
@@ -1122,10 +1122,10 @@ public void setSpawnStrategy( UnitOfWorkSpawnStrategy spawnStrategy )
}
/**
- * Class SafeFlowListener safely calls a wrapped FlowListener.
+ * Class SafeCascadeListener safely calls a wrapped CascadeListener.
* <p/>
* This is done for a few reasons, the primary reason is so exceptions thrown by the Listener
- * can be caught by the calling Thread. Since Flow is asynchronous, much of the work is done in the run() method
+ * can be caught by the calling Thread. Since Cascade is asynchronous, much of the work is done in the run() method
* which in turn is run in a new Thread.
*/
private class SafeCascadeListener implements CascadeListener
@@ -1144,7 +1144,7 @@ public void onStarting( Cascade cascade )
{
try
{
- cascadeListener.onStarting( null );
+ cascadeListener.onStarting( cascade );
}
catch( Throwable throwable )
{
@@ -1156,7 +1156,7 @@ public void onStopping( Cascade cascade )
{
try
{
- cascadeListener.onStopping( null );
+ cascadeListener.onStopping( cascade );
}
catch( Throwable throwable )
{
@@ -1168,7 +1168,7 @@ public void onCompleted( Cascade cascade )
{
try
{
- cascadeListener.onCompleted( null );
+ cascadeListener.onCompleted( cascade );
}
catch( Throwable throwable )
{
@@ -1180,7 +1180,7 @@ public boolean onThrowable( Cascade cascade, Throwable flowThrowable )
{
try
{
- return cascadeListener.onThrowable( null, flowThrowable );
+ return cascadeListener.onThrowable( cascade, flowThrowable );
}
catch( Throwable throwable )
{
@@ -1194,7 +1194,7 @@ private void handleThrowable( Throwable throwable )
{
this.throwable = throwable;
- logWarn( String.format( "flow listener %s threw throwable", cascadeListener ), throwable );
+ logWarn( String.format( "cascade listener %s threw throwable", cascadeListener ), throwable );
// stop this flow
stop();

0 comments on commit 15382ce

Please sign in to comment.