optimizely / optimizely/java-sdk

FindBugs / SpotBugs collision

Open
#525 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

acknowledged
Dominant language
Java
Stars
44
Forks
32
Avg merge
8h 39m
Merged PRs (30d)
1

Description

The core-api module depends on both FindBugs com.google.code.findbugs:jsr305:3.0.2 and SpotBugs com.google.code.findbugs:annotations:3.0.1.

https://github.com/optimizely/java-sdk/blob/c507649832f605fa6dd3419caf2284da0c1436c8/core-api/build.gradle#L5-L6

SpotBugs seems to be the "successor" of FindBugs. But this leads to unexpected errors.

Different versions are used 3.0.1 vs 3.0.2 which does not make sense to me.
And most importantly, since these are almost identical copies, it will create collision errors on the consumer side, for example:

Duplicate class javax.annotation.CheckForNull found in modules annotations-3.0.1 (com.google.code.findbugs:annotations:3.0.1) and jsr305-3.0.2 (com.google.code.findbugs:jsr305:3.0.2)

Is there a good reason to keep this "duplicated" dependency?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with core-api/build.gradle lines 5-6 and inspect why both FindBugs jsr305 and SpotBugs annotations are declared. Reproduce the consumer-side duplicate-class error, then verify whether the dependency declarations can be made non-conflicting or whether a documented reason requires both; done means the collision is resolved or the rationale is clear.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.