This rule checks that Immutable is used from proper package in Entity class. The use of the javax.annotation.concurrent.Immutable annotation in Entity class is forbidden. Instead use the org.hibernate.annotations.Immutable.

Noncompliant Code Example

    package com.devonfw.ide.sonarqube.dataaccess.impl;

    import javax.persistence.Entity;
    import javax.annotation.concurrent.Immutable;

    @Entity
    public class FooEntity {}

Compliant Solution

    package com.devonfw.ide.sonarqube.dataaccess.impl;

    import javax.persistence.Entity;
    import org.hibernate.annotations.Immutable;

    @Entity
    public class FooEntity {}