Prune trailing whitespace & foreachize loops.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5799 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -101,11 +101,11 @@ public class ObjectEditorPanel extends ScrollablePanel
|
||||
// create our field editors
|
||||
try {
|
||||
Field[] fields = object.getClass().getFields();
|
||||
for (int ii = 0; ii < fields.length; ii++) {
|
||||
for (Field field : fields) {
|
||||
// if the field is anything but a plain old public field,
|
||||
// we don't want to edit it
|
||||
if (fields[ii].getModifiers() == Modifier.PUBLIC) {
|
||||
add(_object.getEditor(_ctx, fields[ii]));
|
||||
if (field.getModifiers() == Modifier.PUBLIC) {
|
||||
add(_object.getEditor(_ctx, field));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ public interface BureauService extends InvocationService
|
||||
* @see BureauReceiver
|
||||
*/
|
||||
void bureauInitialized (Client client, String bureauId);
|
||||
|
||||
|
||||
/**
|
||||
* Notifies the server that this bureau has encountered a critical error and needs to be shut
|
||||
* down.
|
||||
|
||||
@@ -345,7 +345,7 @@ public class BureauRegistry
|
||||
}
|
||||
return data.launchError;
|
||||
}
|
||||
|
||||
|
||||
protected void sessionDidStart (PresentsSession client, String id)
|
||||
{
|
||||
Bureau bureau = _bureaus.get(id);
|
||||
@@ -428,7 +428,7 @@ public class BureauRegistry
|
||||
"Bureau error occurred in unregistered bureau", "caller", caller.who(),
|
||||
"message", message);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Callback for when the bureau client acknowledges the creation of an agent.
|
||||
*/
|
||||
@@ -593,10 +593,10 @@ public class BureauRegistry
|
||||
// bureau has already managed to get destroyed before the launch timeout, ignore
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
handleLaunchError(bureau, null, "timeout");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Called when something goes wrong with launching a bureau.
|
||||
*/
|
||||
@@ -613,7 +613,7 @@ public class BureauRegistry
|
||||
_omgr.destroyObject(agent.getOid());
|
||||
}
|
||||
bureau.agentStates.clear();
|
||||
|
||||
|
||||
_bureaus.remove(bureau.bureauId);
|
||||
}
|
||||
|
||||
@@ -789,7 +789,7 @@ public class BureauRegistry
|
||||
{
|
||||
Exception launchError;
|
||||
}
|
||||
|
||||
|
||||
protected Map<String, LauncherEntry> _launchers = Maps.newHashMap();
|
||||
protected Map<String, Bureau> _bureaus = Maps.newHashMap();
|
||||
|
||||
|
||||
@@ -143,10 +143,10 @@ public class BureauLogRedirector
|
||||
_written += length;
|
||||
|
||||
} else if (showTrunc) {
|
||||
DateFormat format =
|
||||
DateFormat format =
|
||||
DateFormat.getDateTimeInstance(DateFormat.FULL, DateFormat.FULL);
|
||||
_target.info(
|
||||
format.format(new Date()) +
|
||||
format.format(new Date()) +
|
||||
": Size limit reached, suppressing further output");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ public interface ChatService extends InvocationService
|
||||
{
|
||||
/**
|
||||
* Communicates the response to a {@link ChatService#tell} request.
|
||||
*
|
||||
*
|
||||
* @param idleTime the number of ms the tellee has been idle or 0L if they are not idle.
|
||||
* @param awayMessage the away message configured by the told player or null if they have
|
||||
* no away message.
|
||||
@@ -52,7 +52,7 @@ public interface ChatService extends InvocationService
|
||||
/**
|
||||
* Requests that a tell message be delivered to the user with username equal to
|
||||
* <code>target</code>.
|
||||
*
|
||||
*
|
||||
* @param client a connected, operational client instance.
|
||||
* @param target the username of the user to which the tell message should be delivered.
|
||||
* @param message the contents of the message.
|
||||
@@ -62,7 +62,7 @@ public interface ChatService extends InvocationService
|
||||
|
||||
/**
|
||||
* Requests that a message be broadcast to all users in the system.
|
||||
*
|
||||
*
|
||||
* @param client a connected, operational client instance.
|
||||
* @param message the contents of the message.
|
||||
* @param listener the reference that will receive a failure response.
|
||||
|
||||
@@ -33,12 +33,12 @@ public class ObserverOps
|
||||
public Session (com.threerings.presents.client.Client client) {
|
||||
_client = client;
|
||||
}
|
||||
|
||||
|
||||
public boolean apply (SessionObserver obs) {
|
||||
notify(obs);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
protected abstract void notify (SessionObserver obs);
|
||||
|
||||
protected com.threerings.presents.client.Client _client;
|
||||
@@ -49,13 +49,13 @@ public class ObserverOps
|
||||
public Client (com.threerings.presents.client.Client client) {
|
||||
super(client);
|
||||
}
|
||||
|
||||
|
||||
@Override public void notify (SessionObserver obs) {
|
||||
if (obs instanceof ClientObserver) {
|
||||
notify((ClientObserver)obs);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
protected abstract void notify (ClientObserver obs);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ public class PeerSession extends PresentsSession
|
||||
// let the peer manager know that we're here
|
||||
_peermgr.peerStartedSession(this);
|
||||
}
|
||||
|
||||
|
||||
@Override // from PresentsSession
|
||||
protected void sessionConnectionClosed ()
|
||||
{
|
||||
|
||||
@@ -100,9 +100,9 @@ public class ClassUtil
|
||||
public static Method findMethod (Class<?> clazz, String name)
|
||||
{
|
||||
Method[] methods = clazz.getMethods();
|
||||
for (int i = 0; i < methods.length; i++) {
|
||||
if (methods[i].getName().equals(name)) {
|
||||
return methods[i];
|
||||
for (Method method : methods) {
|
||||
if (method.getName().equals(name)) {
|
||||
return method;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
||||
@@ -48,7 +48,7 @@ public abstract class PersistingUnit extends Invoker.Unit
|
||||
super(name);
|
||||
_listener = listener;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Creates a persisting unit with the supplied name and listener and a set of key/value pairs
|
||||
* that will be included in the failure message if this unit fails.
|
||||
|
||||
Reference in New Issue
Block a user