DEPRECATED_API_SHOULD_NOT_BE_USED has false positive if a user doesn't actually use deprecated features
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 43/100
Research direction
Start by locating the implementation and tests for DEPRECATED_API_SHOULD_NOT_BE_USED; the issue gives a minimal Kotlin reproducer using Jackson 2.17.2 and ArchUnit 1.3.0. Run or adapt that example to confirm the false positive, then add a regression test and verify the rule no longer reports an unused deprecated annotation field.
Written by the indexing model from the issue text.
Description
Hi,
I've found interesting false-positive example, where DEPRECATED_API_SHOULD_NOT_BE_USED trows an exception, while I don't actually use a deprecated feature.
Minimal example is below, it's in Kotlin.
There archunit found that JsonSerialize annotation has a deprecated field (include), but I don't use it directly, so this code should not violate the check.
Jackson version is 2.17.2
archunit version is 1.3.0
Java version: 17
import com.fasterxml.jackson.databind.annotation.JsonSerialize
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer
data class Response(
@get:JsonSerialize(using = ToStringSerializer::class)
val field: Int? = null,
)
- Dominant language
- Java
- Stars
- 3.9k
- Forks
- 350
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 22
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from TNG/ArchUnit
-
breaking change
Difficulty 5/5 Over a week Newbie friendliness 18/100
TNG/ArchUnit#1756 · 1 comment ·
Maintainers usually reply within 1 day
-
breaking change
Difficulty 4/5 3-5 days Newbie friendliness 30/100
Maintainers usually reply within 1 day
-
breaking change
Difficulty 4/5 3-5 days Newbie friendliness 22/100
Maintainers usually reply within 1 day
-
breaking change
Difficulty 3/5 Half a day Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
breaking change
Difficulty 5/5 Over a week Newbie friendliness 12/100
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 75/100
521xueweihan/HelloGitHub#4105 ·
-
Awaiting further input from submitter
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 1 day
-
code-maintenance
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
Maintainers usually reply within 1 day