Skip to content

Commit

Permalink
#329 relax bulk avu delete when no avus to delete
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-conway committed Mar 27, 2019
1 parent 8ee3539 commit 6a8d848
Show file tree
Hide file tree
Showing 2 changed files with 170 additions and 170 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,9 @@ public final class CollectionAOImpl extends FileCatalogObjectAOImpl implements C
/**
* Default constructor
*
* @param irodsSession
* {@link IRODSSession}
* @param irodsAccount
* {@link IRODSAccount}
* @throws JargonException
* for iRODS error
* @param irodsSession {@link IRODSSession}
* @param irodsAccount {@link IRODSAccount}
* @throws JargonException for iRODS error
*/
protected CollectionAOImpl(final IRODSSession irodsSession, final IRODSAccount irodsAccount)
throws JargonException {
Expand Down Expand Up @@ -600,8 +597,12 @@ public void deleteAllAVUMetadata(final String absolutePath) throws FileNotFoundE
.add(AvuData.instance(metadata.getAvuAttribute(), metadata.getAvuValue(), metadata.getAvuUnit()));
}

deleteBulkAVUMetadataFromCollection(objStat.getAbsolutePath(), avusToDelete);
log.debug("metadata removed");
if (avusToDelete.isEmpty()) {
log.debug("no metadata to delete");
} else {
deleteBulkAVUMetadataFromCollection(objStat.getAbsolutePath(), avusToDelete);
log.debug("metadata removed");
}
}

/*
Expand Down Expand Up @@ -1641,8 +1642,8 @@ public FilePermissionEnum getPermissionForCollection(final String irodsAbsoluteP
* @param absolutePath
* @param recursive
* @return
* @throws FileNotFoundException
* if the underlying file is not found by the absolute path
* @throws FileNotFoundException if the underlying file is not found by the
* absolute path
* @throws JargonException
*/
private boolean adjustRecursiveOption(final String absolutePath, final boolean recursive)
Expand Down
Loading

0 comments on commit 6a8d848

Please sign in to comment.