Skip to content

Commit bc4ce73

Browse files
authored
Declare osgi.serviceloader.registrar requirement as optional. (#155)
1 parent 31985aa commit bc4ce73

File tree

6 files changed

+18
-6
lines changed

6 files changed

+18
-6
lines changed

src/main/java/com/ctc/wstx/dtd/DTDSchemaFactory.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
import com.ctc.wstx.util.SymbolTable;
3333
import com.ctc.wstx.util.URLUtil;
3434

35+
import static aQute.bnd.annotation.Resolution.OPTIONAL;
36+
3537
/**
3638
* Factory for creating DTD validator schema objects (shareable stateless
3739
* "blueprints" for creating actual validators).
@@ -41,7 +43,7 @@
4143
* documents) is only accessible by core Woodstox. The externally
4244
* accessible
4345
*/
44-
@ServiceProvider(XMLValidationSchemaFactory.class)
46+
@ServiceProvider(value = XMLValidationSchemaFactory.class, resolution = OPTIONAL)
4547
public class DTDSchemaFactory
4648
extends XMLValidationSchemaFactory
4749
{

src/main/java/com/ctc/wstx/msv/RelaxNGSchemaFactory.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
import com.sun.msv.reader.GrammarReaderController;
2828
import com.sun.msv.reader.trex.ng.RELAXNGReader;
2929

30+
import static aQute.bnd.annotation.Resolution.OPTIONAL;
31+
3032
/**
3133
* This is a StAX2 schema factory that can parse and create schema instances
3234
* for creating validators that validate documents to check their validity
@@ -36,7 +38,7 @@
3638
* to work, and acts as a quite thin wrapper layer (although not a completely
3739
* trivial one, since MSV only exports SAX API, some adapting is needed)
3840
*/
39-
@ServiceProvider(XMLValidationSchemaFactory.class)
41+
@ServiceProvider(value = XMLValidationSchemaFactory.class, resolution = OPTIONAL)
4042
public class RelaxNGSchemaFactory
4143
extends BaseSchemaFactory
4244
{

src/main/java/com/ctc/wstx/msv/W3CSchemaFactory.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
import com.sun.msv.reader.GrammarReaderController;
2828
import com.sun.msv.reader.xmlschema.XMLSchemaReader;
2929

30+
import static aQute.bnd.annotation.Resolution.OPTIONAL;
31+
3032
/**
3133
* This is a StAX2 schema factory that can parse and create schema instances
3234
* for creating validators that validate documents to check their validity
@@ -36,7 +38,7 @@
3638
* to work, and acts as a quite thin wrapper layer, similar to
3739
* how matching RelaxNG validator works
3840
*/
39-
@ServiceProvider(XMLValidationSchemaFactory.class)
41+
@ServiceProvider(value = XMLValidationSchemaFactory.class, resolution = OPTIONAL)
4042
public class W3CSchemaFactory
4143
extends BaseSchemaFactory
4244
{

src/main/java/com/ctc/wstx/stax/WstxEventFactory.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,13 @@
2828
import com.ctc.wstx.compat.QNameCreator;
2929
import com.ctc.wstx.evt.*;
3030

31+
import static aQute.bnd.annotation.Resolution.OPTIONAL;
32+
3133
/**
3234
* Implementation of {@link XMLEventFactory} to be used with
3335
* Woodstox. Contains minimal additions on top of Stax2 RI.
3436
*/
35-
@ServiceProvider(XMLEventFactory.class)
37+
@ServiceProvider(value = XMLEventFactory.class, resolution = OPTIONAL)
3638
public final class WstxEventFactory
3739
extends Stax2EventFactoryImpl
3840
{

src/main/java/com/ctc/wstx/stax/WstxInputFactory.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@
5454
import com.ctc.wstx.util.SymbolTable;
5555
import com.ctc.wstx.util.URLUtil;
5656

57+
import static aQute.bnd.annotation.Resolution.OPTIONAL;
58+
5759
/**
5860
* Factory for creating various Stax objects (stream/event reader,
5961
* writer).
@@ -69,7 +71,7 @@
6971
*
7072
* @author Tatu Saloranta
7173
*/
72-
@ServiceProvider(XMLInputFactory.class)
74+
@ServiceProvider(value = XMLInputFactory.class, resolution = OPTIONAL)
7375
public class WstxInputFactory
7476
extends XMLInputFactory2
7577
implements ReaderCreator,

src/main/java/com/ctc/wstx/stax/WstxOutputFactory.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@
5252
import com.ctc.wstx.sw.XmlWriter;
5353
import com.ctc.wstx.util.URLUtil;
5454

55+
import static aQute.bnd.annotation.Resolution.OPTIONAL;
56+
5557
/**
5658
* Implementation of {@link XMLOutputFactory} for Wstx.
5759
*<p>
@@ -62,7 +64,7 @@
6264
* </li>
6365
*</ul>
6466
*/
65-
@ServiceProvider(XMLOutputFactory.class)
67+
@ServiceProvider(value = XMLOutputFactory.class, resolution = OPTIONAL)
6668
public class WstxOutputFactory
6769
extends XMLOutputFactory2
6870
implements OutputConfigFlags

0 commit comments

Comments
 (0)