private void copyFieldAttributes(){
  if ((loadFields == null) || fields == null) {
    return;
  }
  for (int i=0; i < loadFields.length; i++) {
    ObjectStreamField loadField=loadFields[i];
    String name=loadField.getName();
    for (int j=0; j < fields.length; j++) {
      ObjectStreamField field=fields[j];
      if (name.equals(field.getName())) {
        loadField.setUnshared(field.isUnshared());
        loadField.setOffset(field.getOffset());
        break;
      }
    }
  }
}

private void copyFieldAttributes ( ) { if ( ( loadFields == null ) || fields == null ) { return ; } for ( int i = 0 ; i < loadFields . length ; i ++ ) { ObjectStreamField loadField = loadFields [ i ] ; String name = loadField . getName ( ) ; for ( int j = 0 ; j < fields . length ; j ++ ) { ObjectStreamField field = fields [ j ] ; if ( name . equals ( field . getName ( ) ) ) { loadField . setUnshared ( field . isUnshared ( ) ) ; loadField . setOffset ( field . getOffset ( ) ) ; break ; } } } }
if a class uses " serialpersistentfields " to define the serialized fields , this . loadfields cannot get the " unshared " information when deserializing fields using current implementation of objectinputstream . this method provides a way to copy the " unshared " attribute from this . fields .
