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 c9bf904973f9ef5a9289a0600634a389fa9e5d5c..a6f8a1e4002cad51ffd8946c41a17293f195af4b 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 @@ -139,7 +139,7 @@ public class SLUBStoragePlugin extends AbstractStorageHandler { * * @param fixity concrete fixity object * @param storedEntityIdentifier - * @param is RelativePath + * @param isRelativePath RelativePath * @param algorithm which algorithm should be used * @return result * @throws NoSuchAlgorithmException @@ -163,7 +163,6 @@ public class SLUBStoragePlugin extends AbstractStorageHandler { * @param fixity concrete fixity object * @param storedEntityIdentifier path to file which should be checked * @param isRelativePath indicates if path is relative - * @param result result is boolean variable to hold states of all fixity checks * @return result * @throws Exception */ @@ -424,7 +423,8 @@ public class SLUBStoragePlugin extends AbstractStorageHandler { private File getCanonicalFile(String srcPath) { log.info("SLUBStoragePlugin.getCanonicalFile() srcPath='"+ srcPath + "'"); - String fileName = srcPath.split("\\" + File.separator)[(srcPath.split("\\" + File.separator).length - 1)]; + String backslash = "\\"; + String fileName = srcPath.split(backslash + File.separator)[(srcPath.split(backslash + File.separator).length - 1)]; try { File canonicalSrcDir = new File(srcPath).getParentFile().getCanonicalFile(); @@ -502,7 +502,7 @@ public class SLUBStoragePlugin extends AbstractStorageHandler { throw new Exception("error, no section in entity of type "+entitytype +" with 'internalIdentfier' in associated iedoc found, do you use plugin for others than permanent data (IE and filestream)? You should not! Also do not use it for SIPstoragePermanentGroup!"); } String iepid = null; - log.debug("SLUBStoragePlugin.getStreamRelativePath iesec=" + iesec.toString()); + log.debug("SLUBStoragePlugin.getStreamRelativePath iesec=" + iesec); List<DnxSectionRecord> records = iesec.getRecordList(); for (DnxSectionRecord element : records) { if ("PID".equals(element.getKeyById("internalIdentifierType").getValue())) { @@ -512,8 +512,8 @@ public class SLUBStoragePlugin extends AbstractStorageHandler { } // raise Exception if IEPID is null if (null == iepid) { - log.error ("SLUBStoragePlugin.getStreamRelativePath iesec="+iesec.toString() ); - throw new Exception("error, could not get IEPID for storedEntityMetaData:"+storedEntityMetaData.toString() +" of type " + entitytype); + log.error ("SLUBStoragePlugin.getStreamRelativePath iesec="+iesec() ); + throw new Exception("error, could not get IEPID for storedEntityMetaData:"+storedEntityMetaData +" of type " + entitytype); } log.debug("SLUBStoragePlugin.getStreamRelativePath iepid=" + iepid + " (entitytype=" + entitytype + ")"); // get creationDate of "objectCharacteristics" @@ -525,7 +525,7 @@ public class SLUBStoragePlugin extends AbstractStorageHandler { sdf.setLenient(false); /* if parse errors, do not guess about */ Date d = sdf.parse(datestring); date.setTime(d); - log.debug("SLUBStoragePlugin.getStreamRelativePath creation Date read=" + datestring + " parsed=" + date.toString()); + log.debug("SLUBStoragePlugin.getStreamRelativePath creation Date read=" + datestring + " parsed=" + date); // now create path in format /yyyy/MM/dd/IEPID/ relativeDirectoryPath = relativeDirectoryPath + new SimpleDateFormat("yyyy").format(d); relativeDirectoryPath = relativeDirectoryPath + File.separator;