From a7cae67d37be90503b5ae6e8fb67e6049b380697 Mon Sep 17 00:00:00 2001 From: Ancuta Morarasu Date: Tue, 2 Jul 2019 19:20:57 +0300 Subject: [PATCH] REPO-4366 / REPO-4458: Update Tika to 1.21-alfresco-patched (#502) * Updated alfresco-data-model (8.42), which depends on the patched tika -1.21-20190624-alfresco-patched. * Update poi library to 4.0.1 to match the version in tika. --- pom.xml | 4 ++-- .../filesys/repo/CIFSContentComparator.java | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/pom.xml b/pom.xml index a1754a091a..7288cc4f1a 100644 --- a/pom.xml +++ b/pom.xml @@ -38,7 +38,7 @@ 6.2 7.17 6.1 - 8.41 + 8.42 7.1 1.1 1.0.11 @@ -47,7 +47,7 @@ 5.1.8.RELEASE 4.5.9 7.7.10 - 3.17 + 4.0.1 7.2 1.0.0 5.22.0 diff --git a/src/main/java/org/alfresco/filesys/repo/CIFSContentComparator.java b/src/main/java/org/alfresco/filesys/repo/CIFSContentComparator.java index c516f72a81..1a73bc36be 100644 --- a/src/main/java/org/alfresco/filesys/repo/CIFSContentComparator.java +++ b/src/main/java/org/alfresco/filesys/repo/CIFSContentComparator.java @@ -47,7 +47,7 @@ import org.apache.poi.hssf.usermodel.HSSFWorkbook; import org.apache.poi.poifs.filesystem.DirectoryEntry; import org.apache.poi.poifs.filesystem.EntryUtils; import org.apache.poi.poifs.filesystem.FilteringDirectoryNode; -import org.apache.poi.poifs.filesystem.NPOIFSFileSystem; +import org.apache.poi.poifs.filesystem.POIFSFileSystem; /** * Compares content for to see if content is equal. @@ -153,7 +153,7 @@ public class CIFSContentComparator implements ContentComparator } } - private boolean isContentIdentical(NPOIFSFileSystem fs1, NPOIFSFileSystem fs2, Collection excludes) throws IOException + private boolean isContentIdentical(POIFSFileSystem fs1, POIFSFileSystem fs2, Collection excludes) throws IOException { DirectoryEntry de1 = fs1.getRoot(); DirectoryEntry de2 = fs2.getRoot(); @@ -207,9 +207,9 @@ public class CIFSContentComparator implements ContentComparator leftIs = existingContent.getContentInputStream(); // this call guarantees that leftIs is closed. - NPOIFSFileSystem fs2 = new NPOIFSFileSystem(leftIs); + POIFSFileSystem fs2 = new POIFSFileSystem(leftIs); // this call keeps an open file handle and needs closing. - NPOIFSFileSystem fs1 = new NPOIFSFileSystem(newFile); + POIFSFileSystem fs1 = new POIFSFileSystem(newFile); try { @@ -322,8 +322,8 @@ public class CIFSContentComparator implements ContentComparator os2.close(); } - NPOIFSFileSystem fs1 = new NPOIFSFileSystem(tpm1); - NPOIFSFileSystem fs2 = new NPOIFSFileSystem(tpm2); + POIFSFileSystem fs1 = new POIFSFileSystem(tpm1); + POIFSFileSystem fs2 = new POIFSFileSystem(tpm2); return isContentIdentical(fs1, fs2, excludes); } @@ -462,8 +462,8 @@ public class CIFSContentComparator implements ContentComparator } } - NPOIFSFileSystem fs1 = new NPOIFSFileSystem(tpm1); - NPOIFSFileSystem fs2 = new NPOIFSFileSystem(tpm2); + POIFSFileSystem fs1 = new POIFSFileSystem(tpm1); + POIFSFileSystem fs2 = new POIFSFileSystem(tpm2); return isContentIdentical(fs1, fs2, excludes); }