fix compare sourceId with destId
This commit is contained in:
parent
20e3993af2
commit
3979da000f
|
@ -108,8 +108,10 @@ public class SoftCopyOperator extends SoftCopy {
|
||||||
String destId=dest.getId().toString();
|
String destId=dest.getId().toString();
|
||||||
logger.debug("destination id is "+destId);
|
logger.debug("destination id is "+destId);
|
||||||
// in this case the source and dest are the same object
|
// in this case the source and dest are the same object
|
||||||
if(sourceId.equals(destId))
|
if(sourceId.toString().equals(destId)) {
|
||||||
|
logger.info("source and destination are pointing to the same object. The copy operation will have no effects");
|
||||||
return destId;
|
return destId;
|
||||||
|
}
|
||||||
// remove the destination file. The third parameter to true replace the file otherwise the remote id is returned
|
// remove the destination file. The third parameter to true replace the file otherwise the remote id is returned
|
||||||
if(resource.isReplace()){
|
if(resource.isReplace()){
|
||||||
removedId = mongoPrimaryInstance.removeFile(resource, null, resource.isReplace(), null, dest);
|
removedId = mongoPrimaryInstance.removeFile(resource, null, resource.isReplace(), null, dest);
|
||||||
|
|
Loading…
Reference in New Issue