// copy with a temporary array, generates no warning final ArrayList<Thing> things = new ArrayList<Thing>( INITIAL_SIZE ); ... final ArrayList<Object> temp = (ArrayList<Object>)ois.readObject(); things.clear(); for ( Object item : temp ) { things.add( (Thing)item ); }