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

Fix warning ConstraintDeclarationException #8830

Merged
merged 1 commit into from
Feb 5, 2024

Conversation

murdos
Copy link
Contributor

@murdos murdos commented Feb 4, 2024

A method overriding another method must not redefine the parameter constraint configuration, but method InMemoryStatisticsRepository#get(StatisticsCriteria) redefines the configuration of StatisticsRepository#get(StatisticsCriteria)

Interface StatisticsRepository has method signature:

  Statistics get(StatisticsCriteria criteria);

While implementations InMemoryStatisticsRepository and MongoDBStatisticsRepository have additional annotation @NotNull:

 @Override
  public Statistics get(@NotNull StatisticsCriteria criteria) {

A method overriding another method must not redefine the parameter constraint configuration, but method InMemoryStatisticsRepository#get(StatisticsCriteria) redefines the configuration of StatisticsRepository#get(StatisticsCriteria)
Copy link

codecov bot commented Feb 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (33127be) 100.00% compared to head (0fa6e75) 100.00%.

Additional details and impacted files
@@             Coverage Diff             @@
##                main     #8830   +/-   ##
===========================================
  Coverage     100.00%   100.00%           
  Complexity      2817      2817           
===========================================
  Files            719       719           
  Lines          12401     12403    +2     
  Branches         250       251    +1     
===========================================
+ Hits           12401     12403    +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@pascalgrimaud pascalgrimaud merged commit 448a78b into jhipster:main Feb 5, 2024
38 checks passed
@murdos murdos deleted the fix-spring-warning branch February 5, 2024 18:47
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

2 participants