ZOMG, Narya now perfectly passes our coding standards as enforced by

CheckStyle. The checks are slightly looser than I'd like but way better than
nothing and we get a bunch of other useful warnings like shadowed names and
other handy bits.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5253 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2008-07-22 14:36:54 +00:00
parent 5c4ab96880
commit 0a893e1de1
33 changed files with 159 additions and 124 deletions
@@ -22,7 +22,7 @@
package com.threerings.presents.util;
import java.lang.reflect.Method;
import java.util.HashMap;
import java.util.Map;
import com.samskivert.util.MethodFinder;
import com.samskivert.util.StringUtil;
@@ -43,7 +43,7 @@ public class ClassUtil
* @return the method with the specified name or null if no method with that name could be
* found.
*/
public static Method getMethod (String name, Object target, HashMap<String,Method> cache)
public static Method getMethod (String name, Object target, Map<String, Method> cache)
{
Class tclass = target.getClass();
String key = tclass.getName() + ":" + name;
@@ -80,7 +80,7 @@ public class ClassUtil
} catch (NoSuchMethodException nsme) {
// nothing to do here but fall through and return null
log.info("No such method [name=" + name + ", tclass=" + tclass.getName() +
log.info("No such method [name=" + name + ", tclass=" + tclass.getName() +
", args=" + StringUtil.toString(args) + ", error=" + nsme + "].");
} catch (SecurityException se) {
@@ -34,6 +34,8 @@ import static com.threerings.presents.Log.log;
* result is ignored. If the failure is an instance fo {@link InvocationException} the message will
* be passed on to the confirm listener, otherwise they will be provided with {@link
* InvocationCodes#INTERNAL_ERROR}.
*
* @param <T> the type of result expected by the listener.
*/
public class IgnoreConfirmAdapter<T> implements ResultListener<T>
{
@@ -110,7 +110,7 @@ public abstract class PersistingUnit extends Invoker.Unit
* If the listener is known to be a ResultListener, this will cast it and report that the
* request was processed.
*/
protected void reportRequestProcessed (Object result )
protected void reportRequestProcessed (Object result)
{
((InvocationService.ResultListener)_listener).requestProcessed(result);
}
@@ -33,6 +33,8 @@ import static com.threerings.presents.Log.log;
* Adapts the response from a {@link ResultListener} to an InvocationService.ResultListener if the
* failure is an instance of {@link InvocationException} the message will be passed on to the
* result listener, otherwise they will be provided with {@link InvocationCodes#INTERNAL_ERROR}.
*
* @param <T> the type of result expected by the listener.
*/
public class ResultAdapter<T> implements ResultListener<T>
{
@@ -35,6 +35,8 @@ import static com.threerings.presents.Log.log;
* distributed object when it is not know if the subscription will
* complete before the subscriber decides they no longer wish to be
* subscribed.
*
* @param <T> the type of object to which we are subscribing.
*/
public class SafeSubscriber<T extends DObject>
implements Subscriber<T>