Skip to content

feat(backend): get rid of unused hibernate dependency#6286

Open
anna-parker wants to merge 1 commit intomainfrom
remove_hibernate
Open

feat(backend): get rid of unused hibernate dependency#6286
anna-parker wants to merge 1 commit intomainfrom
remove_hibernate

Conversation

@anna-parker
Copy link
Copy Markdown
Contributor

@anna-parker anna-parker commented Apr 16, 2026

@tombch and I were looking into the exposed ORM and I realized we have a dependency for a different ORM hibernate that appears unused in the code - I now checked that the preview is healthy, so I would remove the dependency.

resolves #

Screenshot

PR Checklist

  • All necessary documentation has been adapted.
  • The implemented feature is covered by appropriate, automated tests.
  • Any manual testing that has been done is documented (i.e. what exactly was tested?)

🚀 Preview: https://remove-hibernate.loculus.org

@claude claude bot added backend related to the loculus backend component dependencies Pull requests that update a dependency file java Pull requests that update Java code labels Apr 16, 2026
@anna-parker anna-parker added the preview Triggers a deployment to argocd label Apr 16, 2026
@anna-parker anna-parker marked this pull request as ready for review April 16, 2026 12:03
@anna-parker anna-parker changed the title feat(backend): get rid of unused hibernate dependency - we do not use… feat(backend): get rid of unused hibernate dependency Apr 16, 2026
@claude
Copy link
Copy Markdown
Contributor

claude bot commented Apr 16, 2026

Claude finished @anna-parker's task in 1m 43s —— View job


Code Review

  • Read the changed file
  • Verify hibernate is truly unused in the codebase
  • Provide review feedback

The change removes implementation "org.hibernate.validator:hibernate-validator" from build.gradle.

Verdict: LGTM with one minor note.

The explicit declaration is redundant — gradle.lockfile still contains org.hibernate.validator:hibernate-validator:8.0.3.Final across all configurations, confirming it remains on the classpath via a transitive dependency (likely from springdoc-openapi-starter-webmvc-ui or another Spring Boot starter). No functionality is broken.

One small thing worth noting: the PR description calls this "unused", but hibernate-validator is the runtime implementation of the Jakarta Bean Validation API. The backend does use validation annotations (@Valid, @Max, custom ConstraintValidator implementations in SubmissionController, Organism.kt, etc.) that depend on it at runtime. The explicit declaration is redundant (not unused). A minor wording distinction, but it could mislead a future reader into thinking the validation feature itself isn't needed.

No tests or documentation changes are needed for a dependency declaration cleanup like this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend related to the loculus backend component dependencies Pull requests that update a dependency file java Pull requests that update Java code preview Triggers a deployment to argocd

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant