Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

DEPRECATED_API_SHOULD_NOT_BE_USED has false positive if a user doesn't actually use deprecated features

Open
#1,333 5 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
43/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
java, kotlin
Domain
testing

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

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.

More from TNG/ArchUnit

All issues in TNG/ArchUnit

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.