try { Object o; o = objectInputStream.readObject();
try { o = objectInputStream.readObject();
    private synchronized void processNextObject() throws IOException {        while ((objectInputStream == null) ||                ((this.connection.world == null) && worldNotYetLoaded)) {            /*             * if we are closed, or if we are open and the world is not yet             * loaded, then wait until the world has been             * loaded. Test mutex to see if we are in a client + therefore             * require the world to be loaded.             */            try {                wait();            } catch (InterruptedException e) {                /* ignore */            }        }        try {            Object o;            o = objectInputStream.readObject();            if (o instanceof ServerCommand) {                processServerCommand((ServerCommand)o);            } else if (o instanceof Move) {		assert moveReceiver != null;                moveReceiver.processMove((Move)o, this.connection);            } else {                System.out.println("Invalid class sent in stream");            }        } catch (ClassNotFoundException e) {            System.out.println("Unrecognisable command received by " +                "server!");        } catch (InvalidClassException e) {            System.out.println("Invalid class exception received " + e);        } catch (StreamCorruptedException e) {            System.out.println("StreamCorruptedException received " + e);            e.printStackTrace();            throw new RuntimeException(e);        } catch (OptionalDataException e) {            System.out.println("OptionalDataException received " + e);        }    }