Class ReflectionSafeIterator<T>

java.lang.Object
net.shibboleth.shared.collection.ReflectionSafeIterator<T>
Type Parameters:
T - iterator type
All Implemented Interfaces:
Iterator<T>

@Deprecated(forRemoval=true, since="9.0.0") public class ReflectionSafeIterator<T> extends Object implements Iterator<T>
Deprecated, for removal: This API element is subject to removal in a future version.
Wrapper class for delegating publically to Iterator implementations that may themselves be private.

This addresses bugs in Java that result from old implementations of collection classes that were never cleaned up to work properly in Java 17+ after access to JDK internals was clossed off.

Since:
8.2.0
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final Iterator<T>
    Deprecated, for removal: This API element is subject to removal in a future version.
    Wrapped iterator.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
    Deprecated, for removal: This API element is subject to removal in a future version.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface java.util.Iterator

    forEachRemaining, remove
  • Field Details

    • iter

      @Nonnull private final Iterator<T> iter
      Deprecated, for removal: This API element is subject to removal in a future version.
      Wrapped iterator.
  • Constructor Details

    • ReflectionSafeIterator

      public ReflectionSafeIterator(@Nonnull Iterator<T> i)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Constructor.
      Parameters:
      i - iterator to wrap
  • Method Details

    • hasNext

      public boolean hasNext()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      hasNext in interface Iterator<T>
    • next

      public T next()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      next in interface Iterator<T>