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

Sonar: Disable S1192 on CacheConfiguration #25238

Merged
merged 1 commit into from
Feb 19, 2024
Merged

Conversation

qmonmert
Copy link
Contributor

@qmonmert qmonmert commented Feb 17, 2024

Related to #25231

Fix https://sonarcloud.io/project/issues?resolved=false&types=CODE_SMELL&id=jhipster-sample-application&open=AXZiLoQ8RzWdFtSYLf2r


Please make sure the below checklist is followed for Pull Requests.

When you are still working on the PR, consider converting it to Draft (below reviewers) and adding skip-ci label, you can still see CI build result at your branch.

@mshima
Copy link
Member

mshima commented Feb 17, 2024

We should use it for nom jpa applications.
I wonder we should use the meta model for jpa see #25239.

@qmonmert
Copy link
Contributor Author

@mshima jpaMetamodelFiltering is true?

@mshima
Copy link
Member

mshima commented Feb 17, 2024

Hibernate meta model is generated by annotation processor:

{ groupId: 'org.hibernate.orm', artifactId: 'hibernate-jpamodelgen', version: '${hibernate.version}' },

We add to every jpa application.

@qmonmert
Copy link
Contributor Author

not sure to understand...

@mshima
Copy link
Member

mshima commented Feb 18, 2024

Hibernate metamodel generator generates something like:

package tech.jhipster.sample.domain;

import jakarta.annotation.Generated;
import jakarta.persistence.metamodel.EntityType;
import jakarta.persistence.metamodel.SetAttribute;
import jakarta.persistence.metamodel.SingularAttribute;
import jakarta.persistence.metamodel.StaticMetamodel;

@StaticMetamodel(LabelEntity.class)
@Generated("org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor")
public abstract class LabelEntity_ {


        /**
         * @see tech.jhipster.sample.domain.LabelEntity#operations
         **/
        public static volatile SetAttribute<LabelEntity, OperationEntity> operations;

        /**
         * @see tech.jhipster.sample.domain.LabelEntity#id
         **/
        public static volatile SingularAttribute<LabelEntity, Long> id;

        /**
         * @see tech.jhipster.sample.domain.LabelEntity#labelName
         **/
        public static volatile SingularAttribute<LabelEntity, String> labelName;

        /**
         * @see tech.jhipster.sample.domain.LabelEntity
         **/
        public static volatile EntityType<LabelEntity> class_;

        public static final String OPERATIONS = "operations";
        public static final String ID = "id";
        public static final String LABEL_NAME = "labelName";

}

We use it for filtering and can be used here.

@mshima mshima merged commit 88bdda7 into jhipster:main Feb 19, 2024
52 checks passed
@deepu105 deepu105 added this to the 8.2.0 milestone Mar 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants