Fixed a bunch of type safety bits pointed out by the latest version of Eclipse.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5274 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2008-07-30 12:58:51 +00:00
parent ca4c5897fb
commit 725f656197
77 changed files with 248 additions and 250 deletions
@@ -44,7 +44,7 @@ public class PresentsObjectAccess
public static AccessController DEFAULT = new AccessController()
{
// documentation inherited from interface
public boolean allowSubscribe (DObject object, Subscriber subscriber)
public boolean allowSubscribe (DObject object, Subscriber<?> subscriber)
{
// allow anyone to subscribe
return true;
@@ -70,12 +70,13 @@ public class PresentsObjectAccess
public static AccessController CLIENT = new AccessController()
{
// documentation inherited from interface
public boolean allowSubscribe (DObject object, Subscriber sub)
public boolean allowSubscribe (DObject object, Subscriber<?> sub)
{
boolean allowed = true;
// if the subscriber is a client, ensure that they are this same user
if (sub instanceof PresentsClient) {
allowed = ((PresentsClient)sub).getClientObject() == object;
if (PresentsClient.class.isInstance(sub)) {
@SuppressWarnings("unchecked") PresentsClient client = (PresentsClient)sub;
allowed = (client.getClientObject() == object);
if (!allowed) {
log.warning("Refusing ClientObject subscription request " +
"[obj=" + ((ClientObject)object).who() + ", sub=" + sub + "].");