diff --git a/PhotoSlide/src/main/java/org/photoslide/browserlighttable/MediaLoadingTask.java b/PhotoSlide/src/main/java/org/photoslide/browserlighttable/MediaLoadingTask.java index 3f407fa..3260ae0 100644 --- a/PhotoSlide/src/main/java/org/photoslide/browserlighttable/MediaLoadingTask.java +++ b/PhotoSlide/src/main/java/org/photoslide/browserlighttable/MediaLoadingTask.java @@ -82,7 +82,7 @@ protected MediaFile call() throws Exception { updateTitle("Reading cache..."); //restore cache - File inPath = new File(Utility.getAppData() + File.separatorChar + "cache" + File.separatorChar + createMD5Hash(selectedPath.toString()+"-") + selectedPath.toFile().getName() + ".bin"); + File inPath = new File(Utility.getAppData() + File.separatorChar + "cache" + File.separatorChar + createMD5Hash(selectedPath.toString()) + "-" + selectedPath.toFile().getName() + ".bin"); FileInputStream fileInputStream; try { fileInputStream = new FileInputStream(inPath); @@ -189,7 +189,7 @@ protected MediaFile call() throws Exception { } } //save cache to disk - File outpath = new File(Utility.getAppData() + File.separatorChar + "cache" + File.separatorChar + createMD5Hash(selectedPath.toString()+"-") + selectedPath.toFile().getName() + ".bin"); + File outpath = new File(Utility.getAppData() + File.separatorChar + "cache" + File.separatorChar + createMD5Hash(selectedPath.toString()) + "-" + selectedPath.toFile().getName() + ".bin"); FileOutputStream fileOutputStream; try { diff --git a/PhotoSlide/src/main/java/org/photoslide/datamodel/MediaFile_Serializable.java b/PhotoSlide/src/main/java/org/photoslide/datamodel/MediaFile_Serializable.java index 2409da5..254a588 100644 --- a/PhotoSlide/src/main/java/org/photoslide/datamodel/MediaFile_Serializable.java +++ b/PhotoSlide/src/main/java/org/photoslide/datamodel/MediaFile_Serializable.java @@ -138,7 +138,7 @@ public static void convertToMediaFile(MediaFile_Serializable mserial, MediaFile m.setStackPos(mserial.getStackPos()); m.setStacked(mserial.isStacked()); m.setPlace(mserial.getPlace()); - m.setFaces(mserial.getFaces()); + m.setFaces(mserial.getFaces()); m.setFilterList(mserial.convertToImageFilterList(mserial.getFilterList())); m.setMediaType(mserial.getMediaType()); m.setTitle(mserial.getTitle()); @@ -379,7 +379,7 @@ public void setMediaType(MediaFile.MediaTypes mediaType) { public ObservableList convertToImageFilterList(List sourceList) { ObservableList destinationList = FXCollections.observableArrayList(); ObjectMapper mapper = new ObjectMapper(); - sourceList.forEach((filter) -> { + for (String filter : sourceList) { StringTokenizer st = new StringTokenizer(filter, ";"); String fname = (String) st.nextElement(); String value = (String) st.nextElement(); @@ -393,7 +393,7 @@ public ObservableList convertToImageFilterList(List sourceL if (ifm != null) { destinationList.add(ifm); } - }); + } return destinationList; }