Detect programmer error in delegate usage as early as possible and fail.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5223 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -222,6 +222,7 @@ public abstract class PlaceController extends Controller
|
||||
*/
|
||||
protected void addDelegate (PlaceControllerDelegate delegate)
|
||||
{
|
||||
ratifyDelegate(delegate);
|
||||
if (_delegates == null) {
|
||||
_delegates = new ArrayList<PlaceControllerDelegate>();
|
||||
}
|
||||
@@ -266,6 +267,14 @@ public abstract class PlaceController extends Controller
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Protects against programmer error.
|
||||
*/
|
||||
protected void ratifyDelegate (PlaceControllerDelegate delegate)
|
||||
{
|
||||
// nothing to do here, all PlaceControllerDelegates are safe for us
|
||||
}
|
||||
|
||||
/** A reference to the active client context. */
|
||||
protected CrowdContext _ctx;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user