SLING-8570 - Extract a generic Content Parser API from org.apache.sling.jcr.contentparser with pluggable implementations

* minor code cleanup
diff --git a/src/main/java/org/apache/sling/contentparser/api/ContentParser.java b/src/main/java/org/apache/sling/contentparser/api/ContentParser.java
index 2738088..4b3a29f 100644
--- a/src/main/java/org/apache/sling/contentparser/api/ContentParser.java
+++ b/src/main/java/org/apache/sling/contentparser/api/ContentParser.java
@@ -60,6 +60,6 @@
      * @throws IOException    when an I/O error occurs
      * @throws ParseException when a parsing error occurs.
      */
-    void parse(ContentHandler contentHandler, InputStream inputStream, ParserOptions parserOptions) throws IOException, ParseException;
+    void parse(ContentHandler contentHandler, InputStream inputStream, ParserOptions parserOptions) throws IOException;
 
 }
diff --git a/src/main/java/org/apache/sling/contentparser/api/ParserHelper.java b/src/main/java/org/apache/sling/contentparser/api/ParserHelper.java
index 3d6a973..a0d3c11 100644
--- a/src/main/java/org/apache/sling/contentparser/api/ParserHelper.java
+++ b/src/main/java/org/apache/sling/contentparser/api/ParserHelper.java
@@ -42,6 +42,9 @@
             DateTimeFormatter.ofPattern(ISO_8601_MILLISECONDS_DATE_FORMAT,
                     DATE_FORMAT_LOCALE);
 
+    // static methods only
+    private ParserHelper() {}
+
     /**
      * Attempts to parse a {@code string} using first the {@link #ISO_8601_MILLISECONDS_DATE_FORMAT} format and then the {@link
      * #ECMA_DATE_FORMAT}.
@@ -95,7 +98,7 @@
         return convertedArray;
     }
 
-    private static Calendar parseDate(String string, DateTimeFormatter formatter) throws DateTimeParseException {
+    private static Calendar parseDate(String string, DateTimeFormatter formatter) {
         final ZonedDateTime zonedDateTime = ZonedDateTime.parse(string, formatter);
         final Instant instant = zonedDateTime.toInstant();
         Calendar calendar = Calendar.getInstance();
diff --git a/src/main/java/org/apache/sling/contentparser/api/ParserOptions.java b/src/main/java/org/apache/sling/contentparser/api/ParserOptions.java
index c28ffe7..3bdcb12 100644
--- a/src/main/java/org/apache/sling/contentparser/api/ParserOptions.java
+++ b/src/main/java/org/apache/sling/contentparser/api/ParserOptions.java
@@ -105,7 +105,7 @@
      * @return this
      */
     public ParserOptions ignorePropertyNames(Set<String> value) {
-        this.ignorePropertyNames = value;
+        this.ignorePropertyNames = Collections.unmodifiableSet(value);
         return this;
     }
 
@@ -120,7 +120,7 @@
      * @return this
      */
     public ParserOptions ignoreResourceNames(Set<String> value) {
-        this.ignoreResourceNames = value;
+        this.ignoreResourceNames = Collections.unmodifiableSet(value);
         return this;
     }
 
@@ -135,7 +135,7 @@
      * @return this
      */
     public ParserOptions removePropertyNamePrefixes(Set<String> value) {
-        this.removePropertyNamePrefixes = value;
+        this.removePropertyNamePrefixes = Collections.unmodifiableSet(value);
         return this;
     }