Skip to content

Missing JsonFactory "provides" SPI with JPMS in jackson-core module #1340

Description

@rashtao

SPI does not work in Java projects using JPMS, since module-info.java does not contains any provides directive.

To reproduce, I created a Java project with:

  • module-info.java
    module foo {
        requires com.fasterxml.jackson.core;
        uses com.fasterxml.jackson.core.JsonFactory;
    }
  • main
    public static void main(String[] args) {
          Optional<JsonFactory> jf = ServiceLoader.load(JsonFactory.class).findFirst();
          System.out.println(jf.isPresent()); // --> false
    }

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions