From c8e64cb146b3902aec0a88c9fd2b387c18bf8f58 Mon Sep 17 00:00:00 2001 From: Tatu Saloranta Date: Wed, 11 Jan 2023 19:38:01 -0800 Subject: [PATCH] Revert "Declare osgi.serviceloader.registrar requirement as optional. (#155)" (#164) This reverts commit bc4ce73b56514928742c643e02e22bffedc63607. --- src/main/java/com/ctc/wstx/dtd/DTDSchemaFactory.java | 4 +--- src/main/java/com/ctc/wstx/msv/RelaxNGSchemaFactory.java | 4 +--- src/main/java/com/ctc/wstx/msv/W3CSchemaFactory.java | 4 +--- src/main/java/com/ctc/wstx/stax/WstxEventFactory.java | 4 +--- src/main/java/com/ctc/wstx/stax/WstxInputFactory.java | 4 +--- src/main/java/com/ctc/wstx/stax/WstxOutputFactory.java | 4 +--- 6 files changed, 6 insertions(+), 18 deletions(-) diff --git a/src/main/java/com/ctc/wstx/dtd/DTDSchemaFactory.java b/src/main/java/com/ctc/wstx/dtd/DTDSchemaFactory.java index 60517fa9..660177c3 100644 --- a/src/main/java/com/ctc/wstx/dtd/DTDSchemaFactory.java +++ b/src/main/java/com/ctc/wstx/dtd/DTDSchemaFactory.java @@ -32,8 +32,6 @@ import com.ctc.wstx.util.SymbolTable; import com.ctc.wstx.util.URLUtil; -import static aQute.bnd.annotation.Resolution.OPTIONAL; - /** * Factory for creating DTD validator schema objects (shareable stateless * "blueprints" for creating actual validators). @@ -43,7 +41,7 @@ * documents) is only accessible by core Woodstox. The externally * accessible */ -@ServiceProvider(value = XMLValidationSchemaFactory.class, resolution = OPTIONAL) +@ServiceProvider(XMLValidationSchemaFactory.class) public class DTDSchemaFactory extends XMLValidationSchemaFactory { diff --git a/src/main/java/com/ctc/wstx/msv/RelaxNGSchemaFactory.java b/src/main/java/com/ctc/wstx/msv/RelaxNGSchemaFactory.java index fb7a0494..30cfba34 100644 --- a/src/main/java/com/ctc/wstx/msv/RelaxNGSchemaFactory.java +++ b/src/main/java/com/ctc/wstx/msv/RelaxNGSchemaFactory.java @@ -27,8 +27,6 @@ import com.sun.msv.reader.GrammarReaderController; import com.sun.msv.reader.trex.ng.RELAXNGReader; -import static aQute.bnd.annotation.Resolution.OPTIONAL; - /** * This is a StAX2 schema factory that can parse and create schema instances * for creating validators that validate documents to check their validity @@ -38,7 +36,7 @@ * to work, and acts as a quite thin wrapper layer (although not a completely * trivial one, since MSV only exports SAX API, some adapting is needed) */ -@ServiceProvider(value = XMLValidationSchemaFactory.class, resolution = OPTIONAL) +@ServiceProvider(XMLValidationSchemaFactory.class) public class RelaxNGSchemaFactory extends BaseSchemaFactory { diff --git a/src/main/java/com/ctc/wstx/msv/W3CSchemaFactory.java b/src/main/java/com/ctc/wstx/msv/W3CSchemaFactory.java index 0522ab1d..30de0813 100644 --- a/src/main/java/com/ctc/wstx/msv/W3CSchemaFactory.java +++ b/src/main/java/com/ctc/wstx/msv/W3CSchemaFactory.java @@ -27,8 +27,6 @@ import com.sun.msv.reader.GrammarReaderController; import com.sun.msv.reader.xmlschema.XMLSchemaReader; -import static aQute.bnd.annotation.Resolution.OPTIONAL; - /** * This is a StAX2 schema factory that can parse and create schema instances * for creating validators that validate documents to check their validity @@ -38,7 +36,7 @@ * to work, and acts as a quite thin wrapper layer, similar to * how matching RelaxNG validator works */ -@ServiceProvider(value = XMLValidationSchemaFactory.class, resolution = OPTIONAL) +@ServiceProvider(XMLValidationSchemaFactory.class) public class W3CSchemaFactory extends BaseSchemaFactory { diff --git a/src/main/java/com/ctc/wstx/stax/WstxEventFactory.java b/src/main/java/com/ctc/wstx/stax/WstxEventFactory.java index a2bb1a42..f19adf1d 100644 --- a/src/main/java/com/ctc/wstx/stax/WstxEventFactory.java +++ b/src/main/java/com/ctc/wstx/stax/WstxEventFactory.java @@ -28,13 +28,11 @@ import com.ctc.wstx.compat.QNameCreator; import com.ctc.wstx.evt.*; -import static aQute.bnd.annotation.Resolution.OPTIONAL; - /** * Implementation of {@link XMLEventFactory} to be used with * Woodstox. Contains minimal additions on top of Stax2 RI. */ -@ServiceProvider(value = XMLEventFactory.class, resolution = OPTIONAL) +@ServiceProvider(XMLEventFactory.class) public final class WstxEventFactory extends Stax2EventFactoryImpl { diff --git a/src/main/java/com/ctc/wstx/stax/WstxInputFactory.java b/src/main/java/com/ctc/wstx/stax/WstxInputFactory.java index 10d3963e..2de47385 100644 --- a/src/main/java/com/ctc/wstx/stax/WstxInputFactory.java +++ b/src/main/java/com/ctc/wstx/stax/WstxInputFactory.java @@ -54,8 +54,6 @@ import com.ctc.wstx.util.SymbolTable; import com.ctc.wstx.util.URLUtil; -import static aQute.bnd.annotation.Resolution.OPTIONAL; - /** * Factory for creating various Stax objects (stream/event reader, * writer). @@ -71,7 +69,7 @@ * * @author Tatu Saloranta */ -@ServiceProvider(value = XMLInputFactory.class, resolution = OPTIONAL) +@ServiceProvider(XMLInputFactory.class) public class WstxInputFactory extends XMLInputFactory2 implements ReaderCreator, diff --git a/src/main/java/com/ctc/wstx/stax/WstxOutputFactory.java b/src/main/java/com/ctc/wstx/stax/WstxOutputFactory.java index df3d68b6..16221ac4 100644 --- a/src/main/java/com/ctc/wstx/stax/WstxOutputFactory.java +++ b/src/main/java/com/ctc/wstx/stax/WstxOutputFactory.java @@ -52,8 +52,6 @@ import com.ctc.wstx.sw.XmlWriter; import com.ctc.wstx.util.URLUtil; -import static aQute.bnd.annotation.Resolution.OPTIONAL; - /** * Implementation of {@link XMLOutputFactory} for Wstx. *

@@ -64,7 +62,7 @@ * * */ -@ServiceProvider(value = XMLOutputFactory.class, resolution = OPTIONAL) +@ServiceProvider(XMLOutputFactory.class) public class WstxOutputFactory extends XMLOutputFactory2 implements OutputConfigFlags