You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by dk...@apache.org on 2023/01/29 02:55:03 UTC
[sling-org-apache-sling-app-cms] branch master updated: Minor - ignoring false positives
This is an automated email from the ASF dual-hosted git repository.
dklco pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-app-cms.git
The following commit(s) were added to refs/heads/master by this push:
new 607f4872 Minor - ignoring false positives
607f4872 is described below
commit 607f4872b7e6ad1739d06e6335865b06e60e275d
Author: Dan Klco <kl...@adobe.com>
AuthorDate: Sat Jan 28 21:54:56 2023 -0500
Minor - ignoring false positives
---
.../apache/sling/cms/core/internal/FileMetadataExtractorImpl.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/core/src/main/java/org/apache/sling/cms/core/internal/FileMetadataExtractorImpl.java b/core/src/main/java/org/apache/sling/cms/core/internal/FileMetadataExtractorImpl.java
index abdf6f0d..0ec653d2 100644
--- a/core/src/main/java/org/apache/sling/cms/core/internal/FileMetadataExtractorImpl.java
+++ b/core/src/main/java/org/apache/sling/cms/core/internal/FileMetadataExtractorImpl.java
@@ -98,7 +98,7 @@ public class FileMetadataExtractorImpl implements FileMetadataExtractor {
}
if (properties != null) {
properties.putAll(extractMetadata(file.getResource()));
- properties.put("SHA1", generateSha1(resource));
+ properties.put("SHA1", generateSha1(resource)); //NOSONAR
resource.getResourceResolver().refresh();
if (metadata == null) {
resource.getResourceResolver().create(content, CMSConstants.NN_METADATA, properties);
@@ -123,7 +123,7 @@ public class FileMetadataExtractorImpl implements FileMetadataExtractor {
}
}
- @SuppressWarnings(value={"java:S1872", "java:S1874"})
+ @SuppressWarnings(value={"java:S1874"})
public Map<String, Object> extractMetadata(Resource resource)
throws IOException, SAXException, TikaException, RepositoryException, LoginException {
log.info("Extracting metadata from {}", resource.getPath());
@@ -137,7 +137,7 @@ public class FileMetadataExtractorImpl implements FileMetadataExtractor {
parser.parse(is, handler, md, context);
} catch (SAXException se) {
// unfortunately, we can't use instanceof to check as the class is not exported
- if ("WriteLimitReachedException".equals(se.getClass().getSimpleName())) {
+ if ("WriteLimitReachedException".equals(se.getClass().getSimpleName())) { //NOSONAR
log.info("Write limit reached for {}", resource.getPath());
} else {
throw se;