From a82995ca0cc561742559fe9a9d408f7fe89df465 Mon Sep 17 00:00:00 2001
From: Andreas Romeyke <art1@andreas-romeyke.de>
Date: Thu, 22 Oct 2020 18:45:46 +0200
Subject: [PATCH] - fixed outdated java problems/warnings

---
 .../repository/plugin/storage/nfs/SLUBStoragePlugin.java  | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

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 7ca020c..7ac550d 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);
         }
-- 
GitLab