devonfw / sonar-devon4j-plugin

Plugin for SonarQube to validate devonfw architecture
Apache License 2.0
10 stars 16 forks source link

Add 3rd Party rule to avoid Immutable annotation from wrong package #95

Closed hohwille closed 4 years ago

hohwille commented 4 years ago

In a manual review I found that people accidentally used javax.annotation.concurrent.Immutable in a JPA-Entity class instead of org.hibernate.annotations.Immutable. AFAIK there still is no javax.persistence.Immutable annotation (or jakarta.persistence.Immutable). We should detect that in *Entity classes using the javax.annotation.concurrent.Immutable shall raise an issue as this annotation does not seem to make sense there and most probably org.hibernate.annotations.Immutable was indendet.