Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The current code doesn't support Jakarta namespace (ENTITY_LEAK and other checks don't work) #704

Open
mrairjan opened this issue Jun 15, 2023 · 0 comments

Comments

@mrairjan
Copy link

Environment

Component Version
Maven -
Gradle 7.6.1
Java 17
SpotBugs 4.7.3
FindSecBugs 1.12.0

Problem

The current code doesn't support Jakarta namespace (e.g. jakarta.persistence.Entity), most of libraries use Jakarta namespace right now including Spring boot 3. Because of that ENTITY_LEAK and maybe other checks don't work.
I believe that extending

private static final List<String> ENTITY_ANNOTATION_TYPES = Arrays.asList(
with Jakarta annotations would solve this.

Code

package com.test

import jakarta.persistence.Entity
import jakarta.persistence.Id
import java.util.*

@Entity
class TestEntity {
    @Id
    private val id: UUID = UUID.randomUUID()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant