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