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 2021/12/01 18:57:09 UTC

[sling-org-apache-sling-models-jacksonexporter] branch master updated: SLING-10962 Sling Models Exporter: Switch to Commons Collections 4

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

sseifert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-models-jacksonexporter.git


The following commit(s) were added to refs/heads/master by this push:
     new 3c6d311  SLING-10962 Sling Models Exporter: Switch to Commons Collections 4
3c6d311 is described below

commit 3c6d311b5b0cd01121e5a3d7e8bffee70ed7fdf1
Author: Stefan Seifert <st...@users.noreply.github.com>
AuthorDate: Wed Dec 1 19:55:54 2021 +0100

    SLING-10962 Sling Models Exporter: Switch to Commons Collections 4
---
 pom.xml                                                       |  6 +++---
 .../models/jacksonexporter/impl/EnumerationSerializer.java    | 11 ++++++-----
 2 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/pom.xml b/pom.xml
index 4fca997..dceab6e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -121,9 +121,9 @@
             <scope>provided</scope>
         </dependency>
         <dependency>
-            <groupId>commons-collections</groupId>
-            <artifactId>commons-collections</artifactId>
-            <version>3.2.1</version>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-collections4</artifactId>
+            <version>4.1</version>
             <scope>provided</scope>
         </dependency>
         <!-- *************************************************************** -->
diff --git a/src/main/java/org/apache/sling/models/jacksonexporter/impl/EnumerationSerializer.java b/src/main/java/org/apache/sling/models/jacksonexporter/impl/EnumerationSerializer.java
index a0fb4a3..7dfb81f 100644
--- a/src/main/java/org/apache/sling/models/jacksonexporter/impl/EnumerationSerializer.java
+++ b/src/main/java/org/apache/sling/models/jacksonexporter/impl/EnumerationSerializer.java
@@ -16,17 +16,18 @@
  */
 package org.apache.sling.models.jacksonexporter.impl;
 
+import java.io.IOException;
+import java.util.Enumeration;
+import java.util.Iterator;
+
+import org.apache.commons.collections4.iterators.EnumerationIterator;
+
 import com.fasterxml.jackson.core.JsonGenerator;
 import com.fasterxml.jackson.core.JsonProcessingException;
 import com.fasterxml.jackson.databind.JsonMappingException;
 import com.fasterxml.jackson.databind.JsonSerializer;
 import com.fasterxml.jackson.databind.SerializerProvider;
 import com.fasterxml.jackson.databind.ser.ResolvableSerializer;
-import org.apache.commons.collections.iterators.EnumerationIterator;
-
-import java.io.IOException;
-import java.util.Enumeration;
-import java.util.Iterator;
 
 /**
  * Trivial serializer for Enumeration types (needed for Servlet APIs) which leverages