diff --git a/java/org/slub/rosetta/dps/repository/plugin/storage/nfs/SLUBStoragePlugin.java b/java/org/slub/rosetta/dps/repository/plugin/storage/nfs/SLUBStoragePlugin.java index 7ca020c6b0611f74046b386fbf9fcee4cc44cdb8..7ac550dac1b0fefbfa39d17fe1494a602a03a37a 100644 --- a/java/org/slub/rosetta/dps/repository/plugin/storage/nfs/SLUBStoragePlugin.java +++ b/java/org/slub/rosetta/dps/repository/plugin/storage/nfs/SLUBStoragePlugin.java @@ -163,7 +163,7 @@ public class SLUBStoragePlugin extends AbstractStorageHandler { fixity.setValue(checksummer.getChecksum(algorithm)); log.info("SLUBStoragePlugin.checkFixity() newvalue=" + fixity.getValue()); fixity.setResult((oldValue == null) || (oldValue.equalsIgnoreCase(fixity.getValue()))); - result &= fixity.getResult().booleanValue(); + result &= fixity.getResult(); log.info("SLUBStoragePlugin.checkFixity() result=" + result); return result; } @@ -187,7 +187,7 @@ public class SLUBStoragePlugin extends AbstractStorageHandler { catch (Exception e) { pluginname = ""; } - if (pluginname.isEmpty()) { + if (pluginname.length() == 0) { log.error("SLUBStoragePlugin failed to get pluginname, because it is empty. Possibly, there is no valid fixity typeused or a CustomFixityPlugin missed"); } @@ -202,7 +202,7 @@ public class SLUBStoragePlugin extends AbstractStorageHandler { fixity.setValue(getChecksumUsingPlugin(isRelativePath ? getLocalFilePath(storedEntityIdentifier) : storedEntityIdentifier, fixity.getPluginName(), oldValue)); fixity.setResult((oldValue == null) || (oldValue.equals(fixity.getValue()))); log.info("SLUBStoragePlugin.checkFixity() newvalue=" + fixity.getValue()); - result &= fixity.getResult().booleanValue(); + result &= fixity.getResult(); log.info("SLUBStoragePlugin.checkFixity() result=" + result); return result; } @@ -247,7 +247,6 @@ public class SLUBStoragePlugin extends AbstractStorageHandler { return new FileInputStream((isRelative ? this.parameters.get("DIR_ROOT") : "") + storedEntityIdentifier); } public byte[] retrieveEntityByRange(String storedEntityIdentifier, long start, long end) - throws Exception { log.info("SLUBStoragePlugin.retrieveEntitybyRange() with '" + storedEntityIdentifier + "' start=" + start + " end=" + end); byte[] bytes = new byte[(int)(end - start + 1L)]; @@ -357,6 +356,7 @@ public class SLUBStoragePlugin extends AbstractStorageHandler { if ("move".equalsIgnoreCase(filesHandlingMethod)) { File canonicalSrcFile = getCanonicalFile(srcPath); + assert canonicalSrcFile != null; FileUtil.moveFile(canonicalSrcFile, new File(destPath)); saveDestPathsTmpFile(iePid, pid, destPath); }