Skip to content
Snippets Groups Projects
Commit a82995ca authored by Andreas Romeyke's avatar Andreas Romeyke
Browse files

- fixed outdated java problems/warnings

parent 3f8f0f9b
No related branches found
No related tags found
No related merge requests found
...@@ -163,7 +163,7 @@ public class SLUBStoragePlugin extends AbstractStorageHandler { ...@@ -163,7 +163,7 @@ public class SLUBStoragePlugin extends AbstractStorageHandler {
fixity.setValue(checksummer.getChecksum(algorithm)); fixity.setValue(checksummer.getChecksum(algorithm));
log.info("SLUBStoragePlugin.checkFixity() newvalue=" + fixity.getValue()); log.info("SLUBStoragePlugin.checkFixity() newvalue=" + fixity.getValue());
fixity.setResult((oldValue == null) || (oldValue.equalsIgnoreCase(fixity.getValue()))); fixity.setResult((oldValue == null) || (oldValue.equalsIgnoreCase(fixity.getValue())));
result &= fixity.getResult().booleanValue(); result &= fixity.getResult();
log.info("SLUBStoragePlugin.checkFixity() result=" + result); log.info("SLUBStoragePlugin.checkFixity() result=" + result);
return result; return result;
} }
...@@ -187,7 +187,7 @@ public class SLUBStoragePlugin extends AbstractStorageHandler { ...@@ -187,7 +187,7 @@ public class SLUBStoragePlugin extends AbstractStorageHandler {
catch (Exception e) { catch (Exception e) {
pluginname = ""; 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"); 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 { ...@@ -202,7 +202,7 @@ public class SLUBStoragePlugin extends AbstractStorageHandler {
fixity.setValue(getChecksumUsingPlugin(isRelativePath ? getLocalFilePath(storedEntityIdentifier) : storedEntityIdentifier, fixity.getPluginName(), oldValue)); fixity.setValue(getChecksumUsingPlugin(isRelativePath ? getLocalFilePath(storedEntityIdentifier) : storedEntityIdentifier, fixity.getPluginName(), oldValue));
fixity.setResult((oldValue == null) || (oldValue.equals(fixity.getValue()))); fixity.setResult((oldValue == null) || (oldValue.equals(fixity.getValue())));
log.info("SLUBStoragePlugin.checkFixity() newvalue=" + fixity.getValue()); log.info("SLUBStoragePlugin.checkFixity() newvalue=" + fixity.getValue());
result &= fixity.getResult().booleanValue(); result &= fixity.getResult();
log.info("SLUBStoragePlugin.checkFixity() result=" + result); log.info("SLUBStoragePlugin.checkFixity() result=" + result);
return result; return result;
} }
...@@ -247,7 +247,6 @@ public class SLUBStoragePlugin extends AbstractStorageHandler { ...@@ -247,7 +247,6 @@ public class SLUBStoragePlugin extends AbstractStorageHandler {
return new FileInputStream((isRelative ? this.parameters.get("DIR_ROOT") : "") + storedEntityIdentifier); return new FileInputStream((isRelative ? this.parameters.get("DIR_ROOT") : "") + storedEntityIdentifier);
} }
public byte[] retrieveEntityByRange(String storedEntityIdentifier, long start, long end) public byte[] retrieveEntityByRange(String storedEntityIdentifier, long start, long end)
throws Exception
{ {
log.info("SLUBStoragePlugin.retrieveEntitybyRange() with '" + storedEntityIdentifier + "' start=" + start + " end=" + end); log.info("SLUBStoragePlugin.retrieveEntitybyRange() with '" + storedEntityIdentifier + "' start=" + start + " end=" + end);
byte[] bytes = new byte[(int)(end - start + 1L)]; byte[] bytes = new byte[(int)(end - start + 1L)];
...@@ -357,6 +356,7 @@ public class SLUBStoragePlugin extends AbstractStorageHandler { ...@@ -357,6 +356,7 @@ public class SLUBStoragePlugin extends AbstractStorageHandler {
if ("move".equalsIgnoreCase(filesHandlingMethod)) if ("move".equalsIgnoreCase(filesHandlingMethod))
{ {
File canonicalSrcFile = getCanonicalFile(srcPath); File canonicalSrcFile = getCanonicalFile(srcPath);
assert canonicalSrcFile != null;
FileUtil.moveFile(canonicalSrcFile, new File(destPath)); FileUtil.moveFile(canonicalSrcFile, new File(destPath));
saveDestPathsTmpFile(iePid, pid, destPath); saveDestPathsTmpFile(iePid, pid, destPath);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment