private static LookupLocator[] unmarshalLocators(ObjectInputStream in) throws IOException, ClassNotFoundException {
  List l=new ArrayList();
  MarshalledInstance mi;
  while ((mi=(MarshalledInstance)in.readObject()) != null) {
    try {
      l.add((LookupLocator)mi.get(false));
    }
 catch (    Throwable e) {
      if (e instanceof Error && ThrowableConstants.retryable(e) == ThrowableConstants.BAD_OBJECT) {
        throw (Error)e;
      }
      logger.log(Level.WARNING,"failed to recover lookup locator",e);
    }
  }
  return (LookupLocator[])l.toArray(new LookupLocator[l.size()]);
}

private static LookupLocator [ ] unmarshalLocators ( ObjectInputStream in ) throws IOException , ClassNotFoundException { List l = new ArrayList ( ) ; MarshalledInstance mi ; while ( ( mi = ( MarshalledInstance ) in . readObject ( ) ) != null ) { try { l . add ( ( LookupLocator ) mi . get ( false ) ) ; } catch ( Throwable e ) { if ( e instanceof Error && ThrowableConstants . retryable ( e ) == ThrowableConstants . BAD_OBJECT ) { throw ( Error ) e ; } logger . log ( Level . WARNING , "failed to recover lookup locator" , e ) ; } } return ( LookupLocator [ ] ) l . toArray ( new LookupLocator [ l . size ( ) ] ) ; }
returns locators unmarshalled from a null - terminated list of marshalledinstances read from the given stream , logging ( but tolerating ) unmarshalling failures .
