public PanboxShare checkShareIntegrity(PanboxShare share){
  if (share.isOwner()) {
    Collection<PanboxContact> coll=shareManager.checkShareDeviceListIntegrity(share);
    char[] password=null;
    PanboxShare retShare=null;
    try {
      for (Iterator<PanboxContact> it=coll.iterator(); it.hasNext(); ) {
        PanboxContact contact=(PanboxContact)it.next();
        int ret=JOptionPane.showConfirmDialog(getMainWindow(),MessageFormat.format(bundle.getString("client.checkShareIntegrity.devicelistreset"),contact.getEmail()),bundle.getString("client.warn"),JOptionPane.YES_NO_OPTION,JOptionPane.WARNING_MESSAGE);
        if (ret == JOptionPane.YES_OPTION) {
          if (password == null) {
            password=PasswordEnterDialog.invoke(PermissionType.SHARE);
          }
          logger.info("Will try to reinitialize share device list for contact " + contact.getEmail() + " in share "+ share.getName()+ " ...");
          try {
            retShare=shareManager.resetShareInvitation(share,contact.getEmail(),password);
          }
 catch (          UnrecoverableKeyException e) {
            logger.error("Re-initializing share device list failed due to unrecoverable key!",e);
            JOptionPane.showMessageDialog(getMainWindow(),bundle.getString("PanboxClient.unableToRecoverKeys"),bundle.getString("client.error"),JOptionPane.ERROR_MESSAGE);
          }
catch (          ShareManagerException|ShareMetaDataException e) {
            logger.error("Re-initializing share device list failed!",e);
            JOptionPane.showMessageDialog(getMainWindow(),MessageFormat.format(bundle.getString("client.checkShareIntegrity.devicelistresetfailed"),contact.getEmail()),bundle.getString("client.error"),JOptionPane.ERROR_MESSAGE);
          }
        }
 else {
          JOptionPane.showMessageDialog(getMainWindow(),MessageFormat.format(bundle.getString("client.checkShareIntegrity.devicelistnotreset"),contact.getEmail()),bundle.getString("client.warn"),JOptionPane.WARNING_MESSAGE);
        }
      }
    }
  finally {
      if (password != null) {
        Utils.eraseChars(password);
      }
    }
    return retShare;
  }
  return null;
}

public PanboxShare checkShareIntegrity ( PanboxShare share ) { if ( share . isOwner ( ) ) { Collection < PanboxContact > coll = shareManager . checkShareDeviceListIntegrity ( share ) ; char [ ] password = null ; PanboxShare retShare = null ; try { for ( Iterator < PanboxContact > it = coll . iterator ( ) ; it . hasNext ( ) ; ) { PanboxContact contact = ( PanboxContact ) it . next ( ) ; int ret = JOptionPane . showConfirmDialog ( getMainWindow ( ) , MessageFormat . format ( bundle . getString ( "client.checkShareIntegrity.devicelistreset" ) , contact . getEmail ( ) ) , bundle . getString ( "client.warn" ) , JOptionPane . YES_NO_OPTION , JOptionPane . WARNING_MESSAGE ) ; if ( ret == JOptionPane . YES_OPTION ) { if ( password == null ) { password = PasswordEnterDialog . invoke ( PermissionType . SHARE ) ; } logger . info ( "Will try to reinitialize share device list for contact " + contact . getEmail ( ) + " in share " + share . getName ( ) + " ..." ) ; try { retShare = shareManager . resetShareInvitation ( share , contact . getEmail ( ) , password ) ; } catch ( UnrecoverableKeyException e ) { logger . error ( "Re-initializing share device list failed due to unrecoverable key!" , e ) ; JOptionPane . showMessageDialog ( getMainWindow ( ) , bundle . getString ( "PanboxClient.unableToRecoverKeys" ) , bundle . getString ( "client.error" ) , JOptionPane . ERROR_MESSAGE ) ; } catch ( ShareManagerException | ShareMetaDataException e ) { logger . error ( "Re-initializing share device list failed!" , e ) ; JOptionPane . showMessageDialog ( getMainWindow ( ) , MessageFormat . format ( bundle . getString ( "client.checkShareIntegrity.devicelistresetfailed" ) , contact . getEmail ( ) ) , bundle . getString ( "client.error" ) , JOptionPane . ERROR_MESSAGE ) ; } } else { JOptionPane . showMessageDialog ( getMainWindow ( ) , MessageFormat . format ( bundle . getString ( "client.checkShareIntegrity.devicelistnotreset" ) , contact . getEmail ( ) ) , bundle . getString ( "client.warn" ) , JOptionPane . WARNING_MESSAGE ) ; } } } finally { if ( password != null ) { Utils . eraseChars ( password ) ; } } return retShare ; } return null ; }
checks this shares device lists .
