public class RecursiveSearchException extends FactoryRegistryException
FactoryRegistryis invoked recursively for the same category. This exception is often the result of a programming error. It happen typically when an implementation of some
FooFactoryinterface queries in their constructor, directly or indirectly,
FactoryRegistry.getFactory(Class, Predicate, Hints, Hints.Key)} for the same category (namely
FooFactory.class). Factories implemented as wrappers around other factories of the same kind are the most likely to fall in this canvas. If this
RecursiveSearchExceptionwas not throw, the application would typically dies with a
A workaround for this exception is to invoke
getServiceProvider outside the
constuctor, when a method first need it.
|Constructor and Description|
Creates a new exception with a default message determined from the specified category.
Creates a new exception with the specified detail message.
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public RecursiveSearchException(Class<?> category)
public RecursiveSearchException(String message)
Copyright © 1996–2022 Geotools. All rights reserved.