435322 Protect blocker against null failed callback

This commit is contained in:
Greg Wilkins 2014-06-04 13:39:58 +02:00
parent bbab2e7832
commit ac4f8a26b7

View File

@ -66,6 +66,15 @@ public class SharedBlockingCallback
return "SUCCEEDED";
}
};
private static Throwable FAILED = new Throwable()
{
@Override
public String toString()
{
return "FAILED";
}
};
final Blocker _blocker;
@ -148,7 +157,10 @@ public class SharedBlockingCallback
{
if (_state == null)
{
_state = cause;
// TODO remove before release
if (cause==null)
LOG.warn("null failed cause ",new Throwable());
_state = cause==null?FAILED:cause;
_complete.signalAll();
}
else if (_state == IDLE)