You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ss...@apache.org on 2024/04/09 08:41:36 UTC

(sling-org-apache-sling-contentparser-testutils) branch feature/SLING-12281-parent-60 created (now eb5d130)

This is an automated email from the ASF dual-hosted git repository.

sseifert pushed a change to branch feature/SLING-12281-parent-60
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-contentparser-testutils.git


      at eb5d130  SLING-12281 ignore spotless code reformatting commit in git blame

This branch includes the following new commits:

     new 1edd089  SLING-12281 Update to Parent 60, Java 11 Minimum Version
     new 935aa43  SLING-12281 apply spotless code formatting
     new eb5d130  SLING-12281 ignore spotless code reformatting commit in git blame

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



(sling-org-apache-sling-contentparser-testutils) 03/03: SLING-12281 ignore spotless code reformatting commit in git blame

Posted by ss...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

sseifert pushed a commit to branch feature/SLING-12281-parent-60
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-contentparser-testutils.git

commit eb5d1304b9a98994bf8d6d035d5a15d5e6960535
Author: Stefan Seifert <st...@users.noreply.github.com>
AuthorDate: Tue Apr 9 10:40:14 2024 +0200

    SLING-12281 ignore spotless code reformatting commit in git blame
---
 .git-blame-ignore-revs | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs
new file mode 100644
index 0000000..ad41779
--- /dev/null
+++ b/.git-blame-ignore-revs
@@ -0,0 +1 @@
+935aa43fa650d6523f585afb597ea384cb413fe6
\ No newline at end of file


(sling-org-apache-sling-contentparser-testutils) 02/03: SLING-12281 apply spotless code formatting

Posted by ss...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

sseifert pushed a commit to branch feature/SLING-12281-parent-60
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-contentparser-testutils.git

commit 935aa43fa650d6523f585afb597ea384cb413fe6
Author: Stefan Seifert <st...@users.noreply.github.com>
AuthorDate: Tue Apr 9 10:32:57 2024 +0200

    SLING-12281 apply spotless code formatting
---
 pom.xml                                            |  8 ++--
 .../sling/contentparser/testutils/TestUtils.java   | 46 ++++++++++-----------
 .../testutils/mapsupport/ContentElement.java       | 37 +++++++++--------
 .../mapsupport/ContentElementHandler.java          | 47 ++++++++++------------
 .../mapsupport/ContentElementHandlerException.java | 39 +++++++++---------
 5 files changed, 85 insertions(+), 92 deletions(-)

diff --git a/pom.xml b/pom.xml
index 2673948..7b91c37 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <!--
     Licensed to the Apache Software Foundation (ASF) under one
     or more contributor license agreements.  See the NOTICE file
@@ -30,15 +30,13 @@
     <version>2.0.1-SNAPSHOT</version>
 
     <name>Apache Sling Content Parser Test Utilities</name>
-    <description>
-        Apache Sling Content Parser Test Utilities for the Content Parser API implementations
-    </description>
+    <description>Apache Sling Content Parser Test Utilities for the Content Parser API implementations</description>
 
     <scm>
         <connection>scm:git:https://gitbox.apache.org/repos/asf/sling-org-apache-sling-contentparser-testutils.git</connection>
         <developerConnection>scm:git:https://gitbox.apache.org/repos/asf/sling-org-apache-sling-contentparser-testutils.git</developerConnection>
-        <url>https://github.com/apache/sling-org-apache-sling-contentparser-testutils.git</url>
         <tag>HEAD</tag>
+        <url>https://github.com/apache/sling-org-apache-sling-contentparser-testutils.git</url>
     </scm>
 
     <dependencies>
diff --git a/src/main/java/org/apache/sling/contentparser/testutils/TestUtils.java b/src/main/java/org/apache/sling/contentparser/testutils/TestUtils.java
index 339f8c5..da53e1b 100644
--- a/src/main/java/org/apache/sling/contentparser/testutils/TestUtils.java
+++ b/src/main/java/org/apache/sling/contentparser/testutils/TestUtils.java
@@ -1,21 +1,21 @@
-/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- ~ Licensed to the Apache Software Foundation (ASF) under one
- ~ or more contributor license agreements.  See the NOTICE file
- ~ distributed with this work for additional information
- ~ regarding copyright ownership.  The ASF licenses this file
- ~ to you under the Apache License, Version 2.0 (the
- ~ "License"); you may not use this file except in compliance
- ~ with the License.  You may obtain a copy of the License at
- ~
- ~   http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing,
- ~ software distributed under the License is distributed on an
- ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- ~ KIND, either express or implied.  See the License for the
- ~ specific language governing permissions and limitations
- ~ under the License.
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 package org.apache.sling.contentparser.testutils;
 
 import java.io.BufferedInputStream;
@@ -31,7 +31,7 @@ import org.apache.sling.contentparser.testutils.mapsupport.ContentElement;
 import org.apache.sling.contentparser.testutils.mapsupport.ContentElementHandler;
 
 public final class TestUtils {
-    
+
     private TestUtils() {
         // static methods only
     }
@@ -40,15 +40,16 @@ public final class TestUtils {
         return parse(contentParser, new ParserOptions(), file);
     }
 
-    public static ContentElement parse(ContentParser contentParser, ParserOptions parserOptions, File file) throws IOException {
+    public static ContentElement parse(ContentParser contentParser, ParserOptions parserOptions, File file)
+            throws IOException {
         try (FileInputStream fis = new FileInputStream(file);
-             BufferedInputStream bis = new BufferedInputStream(fis)) {
+                BufferedInputStream bis = new BufferedInputStream(fis)) {
             ContentElementHandler handler = new ContentElementHandler();
             contentParser.parse(handler, bis, parserOptions);
             return handler.getRoot();
         }
     }
-    
+
     public static ContentElement parse(ContentParser contentParser, String jsonContent) throws IOException {
         try (ByteArrayInputStream is = new ByteArrayInputStream(jsonContent.getBytes(StandardCharsets.UTF_8))) {
             ContentElementHandler handler = new ContentElementHandler();
@@ -56,5 +57,4 @@ public final class TestUtils {
             return handler.getRoot();
         }
     }
-    
 }
diff --git a/src/main/java/org/apache/sling/contentparser/testutils/mapsupport/ContentElement.java b/src/main/java/org/apache/sling/contentparser/testutils/mapsupport/ContentElement.java
index 0a47845..3b80f50 100644
--- a/src/main/java/org/apache/sling/contentparser/testutils/mapsupport/ContentElement.java
+++ b/src/main/java/org/apache/sling/contentparser/testutils/mapsupport/ContentElement.java
@@ -1,21 +1,21 @@
-/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- ~ Licensed to the Apache Software Foundation (ASF) under one
- ~ or more contributor license agreements.  See the NOTICE file
- ~ distributed with this work for additional information
- ~ regarding copyright ownership.  The ASF licenses this file
- ~ to you under the Apache License, Version 2.0 (the
- ~ "License"); you may not use this file except in compliance
- ~ with the License.  You may obtain a copy of the License at
- ~
- ~   http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing,
- ~ software distributed under the License is distributed on an
- ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- ~ KIND, either express or implied.  See the License for the
- ~ specific language governing permissions and limitations
- ~ under the License.
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 package org.apache.sling.contentparser.testutils.mapsupport;
 
 import java.util.LinkedHashMap;
@@ -84,5 +84,4 @@ public final class ContentElement {
             return child.getChild(remainingPath);
         }
     }
-
 }
diff --git a/src/main/java/org/apache/sling/contentparser/testutils/mapsupport/ContentElementHandler.java b/src/main/java/org/apache/sling/contentparser/testutils/mapsupport/ContentElementHandler.java
index b2de181..942d037 100644
--- a/src/main/java/org/apache/sling/contentparser/testutils/mapsupport/ContentElementHandler.java
+++ b/src/main/java/org/apache/sling/contentparser/testutils/mapsupport/ContentElementHandler.java
@@ -1,21 +1,21 @@
-/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- ~ Licensed to the Apache Software Foundation (ASF) under one
- ~ or more contributor license agreements.  See the NOTICE file
- ~ distributed with this work for additional information
- ~ regarding copyright ownership.  The ASF licenses this file
- ~ to you under the Apache License, Version 2.0 (the
- ~ "License"); you may not use this file except in compliance
- ~ with the License.  You may obtain a copy of the License at
- ~
- ~   http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing,
- ~ software distributed under the License is distributed on an
- ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- ~ KIND, either express or implied.  See the License for the
- ~ specific language governing permissions and limitations
- ~ under the License.
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 package org.apache.sling.contentparser.testutils.mapsupport;
 
 import java.util.Map;
@@ -29,7 +29,7 @@ import org.apache.sling.contentparser.api.ContentHandler;
  * {@link ContentHandler} implementation that produces a tree of {@link ContentElement} items.
  */
 public final class ContentElementHandler implements ContentHandler {
-    
+
     private ContentElement root;
     private static final Pattern PATH_PATTERN = Pattern.compile("^((/[^/]+)*)(/([^/]+))$");
 
@@ -37,8 +37,7 @@ public final class ContentElementHandler implements ContentHandler {
     public void resource(String path, Map<String, Object> properties) {
         if (StringUtils.equals(path, "/")) {
             root = new ContentElement(null, properties);
-        }
-        else {
+        } else {
             if (root == null) {
                 throw new ContentElementHandlerException("Root resource not set.");
             }
@@ -51,8 +50,7 @@ public final class ContentElementHandler implements ContentHandler {
             ContentElement parent;
             if (StringUtils.isEmpty(relativeParentPath)) {
                 parent = root;
-            }
-            else {
+            } else {
                 parent = root.getChild(relativeParentPath);
             }
             if (parent == null) {
@@ -61,9 +59,8 @@ public final class ContentElementHandler implements ContentHandler {
             parent.getChildren().put(name, new ContentElement(name, properties));
         }
     }
-    
+
     public ContentElement getRoot() {
         return root;
     }
-
 }
diff --git a/src/main/java/org/apache/sling/contentparser/testutils/mapsupport/ContentElementHandlerException.java b/src/main/java/org/apache/sling/contentparser/testutils/mapsupport/ContentElementHandlerException.java
index 7f1dd71..ba45b34 100644
--- a/src/main/java/org/apache/sling/contentparser/testutils/mapsupport/ContentElementHandlerException.java
+++ b/src/main/java/org/apache/sling/contentparser/testutils/mapsupport/ContentElementHandlerException.java
@@ -1,21 +1,21 @@
-/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- ~ Licensed to the Apache Software Foundation (ASF) under one
- ~ or more contributor license agreements.  See the NOTICE file
- ~ distributed with this work for additional information
- ~ regarding copyright ownership.  The ASF licenses this file
- ~ to you under the Apache License, Version 2.0 (the
- ~ "License"); you may not use this file except in compliance
- ~ with the License.  You may obtain a copy of the License at
- ~
- ~   http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing,
- ~ software distributed under the License is distributed on an
- ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- ~ KIND, either express or implied.  See the License for the
- ~ specific language governing permissions and limitations
- ~ under the License.
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 package org.apache.sling.contentparser.testutils.mapsupport;
 
 /**
@@ -23,8 +23,7 @@ package org.apache.sling.contentparser.testutils.mapsupport;
  */
 public class ContentElementHandlerException extends RuntimeException {
 
-    public ContentElementHandlerException() {
-    }
+    public ContentElementHandlerException() {}
 
     /**
      * {@inheritDoc}


(sling-org-apache-sling-contentparser-testutils) 01/03: SLING-12281 Update to Parent 60, Java 11 Minimum Version

Posted by ss...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

sseifert pushed a commit to branch feature/SLING-12281-parent-60
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-contentparser-testutils.git

commit 1edd0898c89be6a30ec9f7110dd8b5701966a4ec
Author: Stefan Seifert <st...@users.noreply.github.com>
AuthorDate: Tue Apr 9 10:30:33 2024 +0200

    SLING-12281 Update to Parent 60, Java 11 Minimum Version
---
 .sling-module.json | 5 +++++
 pom.xml            | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/.sling-module.json b/.sling-module.json
new file mode 100644
index 0000000..cfad4d2
--- /dev/null
+++ b/.sling-module.json
@@ -0,0 +1,5 @@
+{
+  "jenkins": {
+    "jdks": [17, 21]
+  }
+}
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 9d34251..2673948 100644
--- a/pom.xml
+++ b/pom.xml
@@ -22,7 +22,7 @@
     <parent>
         <groupId>org.apache.sling</groupId>
         <artifactId>sling</artifactId>
-        <version>52</version>
+        <version>60</version>
         <relativePath />
     </parent>