Skip to content

Question: why the switch from bcprov-jdk15on to bcprov-jdk15to18? #636

Description

@Stephan202

After upgrading to sendgrid-java version 4.6.1 our internal build started to flag the following BanDuplicateClasses violation:

[WARNING] Rule 0: org.apache.maven.plugins.enforcer.BanDuplicateClasses failed with message:
Duplicate class found:

  Found in:
    org.bouncycastle:bcprov-jdk15to18:jar:1.65:compile
    org.bouncycastle:bcprov-jdk15on:jar:1.66:compile
  Duplicate classes:
    org/bouncycastle/LICENSE.class
There may be others but <findAllDuplicates> was set to false, so failing fast

Turns out this is because sendgrid-java switched from bcprov-jdk15on to bcprov-jdk15to18 in d9f4413, while we have another dependency that also pulls in bcprov-jdk15on.

There are of course several ways to resolve or silence this issue on our side, but before I select any of those I wanted to ask you what the reason for this change was. We use sendgrid-java with JDK 11, and bcprov-jdk15on would actually seem to be the better choice, since it also caters to JDK 9+, IIUC.

CC @eshanholtz.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions