Skip to content

Commit

Permalink
Declare osgi.serviceloader.registrar requirement as optional. (#155)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisr3 authored Aug 11, 2022
1 parent 31985aa commit bc4ce73
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 6 deletions.
4 changes: 3 additions & 1 deletion src/main/java/com/ctc/wstx/dtd/DTDSchemaFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
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).
Expand All @@ -41,7 +43,7 @@
* documents) is only accessible by core Woodstox. The externally
* accessible
*/
@ServiceProvider(XMLValidationSchemaFactory.class)
@ServiceProvider(value = XMLValidationSchemaFactory.class, resolution = OPTIONAL)
public class DTDSchemaFactory
extends XMLValidationSchemaFactory
{
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/com/ctc/wstx/msv/RelaxNGSchemaFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
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
Expand All @@ -36,7 +38,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(XMLValidationSchemaFactory.class)
@ServiceProvider(value = XMLValidationSchemaFactory.class, resolution = OPTIONAL)
public class RelaxNGSchemaFactory
extends BaseSchemaFactory
{
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/com/ctc/wstx/msv/W3CSchemaFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
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
Expand All @@ -36,7 +38,7 @@
* to work, and acts as a quite thin wrapper layer, similar to
* how matching RelaxNG validator works
*/
@ServiceProvider(XMLValidationSchemaFactory.class)
@ServiceProvider(value = XMLValidationSchemaFactory.class, resolution = OPTIONAL)
public class W3CSchemaFactory
extends BaseSchemaFactory
{
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/com/ctc/wstx/stax/WstxEventFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,13 @@
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(XMLEventFactory.class)
@ServiceProvider(value = XMLEventFactory.class, resolution = OPTIONAL)
public final class WstxEventFactory
extends Stax2EventFactoryImpl
{
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/com/ctc/wstx/stax/WstxInputFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@
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).
Expand All @@ -69,7 +71,7 @@
*
* @author Tatu Saloranta
*/
@ServiceProvider(XMLInputFactory.class)
@ServiceProvider(value = XMLInputFactory.class, resolution = OPTIONAL)
public class WstxInputFactory
extends XMLInputFactory2
implements ReaderCreator,
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/com/ctc/wstx/stax/WstxOutputFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@
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.
*<p>
Expand All @@ -62,7 +64,7 @@
* </li>
*</ul>
*/
@ServiceProvider(XMLOutputFactory.class)
@ServiceProvider(value = XMLOutputFactory.class, resolution = OPTIONAL)
public class WstxOutputFactory
extends XMLOutputFactory2
implements OutputConfigFlags
Expand Down

0 comments on commit bc4ce73

Please sign in to comment.