You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by ma...@apache.org on 2023/01/28 19:41:34 UTC

[logging-log4j2] branch master updated: Remove unused private class

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

mattsicker pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git


The following commit(s) were added to refs/heads/master by this push:
     new addc348ce6 Remove unused private class
addc348ce6 is described below

commit addc348ce678098c0eb25e6a3837a763a82405e7
Author: Matt Sicker <ma...@apache.org>
AuthorDate: Sat Jan 28 13:41:21 2023 -0600

    Remove unused private class
    
    Signed-off-by: Matt Sicker <ma...@apache.org>
---
 .../org/apache/logging/log4j/ThreadContext.java    | 24 ----------------------
 1 file changed, 24 deletions(-)

diff --git a/log4j-api/src/main/java/org/apache/logging/log4j/ThreadContext.java b/log4j-api/src/main/java/org/apache/logging/log4j/ThreadContext.java
index 90fd6a0fd4..ccaa6eb5db 100644
--- a/log4j-api/src/main/java/org/apache/logging/log4j/ThreadContext.java
+++ b/log4j-api/src/main/java/org/apache/logging/log4j/ThreadContext.java
@@ -22,7 +22,6 @@ import java.util.Collections;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
-import java.util.NoSuchElementException;
 
 import org.apache.logging.log4j.message.ParameterizedMessage;
 import org.apache.logging.log4j.spi.DefaultThreadContextMap;
@@ -142,29 +141,6 @@ public final class ThreadContext {
         }
     }
 
-    /**
-     * An empty iterator. Since Java 1.7 added the Collections.emptyIterator() method, we have to make do.
-     *
-     * @param <E> the type of the empty iterator
-     */
-    private static class EmptyIterator<E> implements Iterator<E> {
-
-        @Override
-        public boolean hasNext() {
-            return false;
-        }
-
-        @Override
-        public E next() {
-            throw new NoSuchElementException("This is an empty iterator!");
-        }
-
-        @Override
-        public void remove() {
-            // no-op
-        }
-    }
-
     /**
      * Empty, immutable Map.
      */