Skip to content

Fix raw types in UpdateUserConstraint and document Java 17 API review#554

Open
devin-ai-integration[bot] wants to merge 3 commits intomasterfrom
devin/1776281989-java17-api-fixes
Open

Fix raw types in UpdateUserConstraint and document Java 17 API review#554
devin-ai-integration[bot] wants to merge 3 commits intomasterfrom
devin/1776281989-java17-api-fixes

Conversation

@devin-ai-integration
Copy link
Copy Markdown

@devin-ai-integration devin-ai-integration Bot commented Apr 15, 2026

Summary

Reviewed all 30 Java files under src/main/java/io/spring/application/ for deprecated/removed Java 17 APIs. No issues were found for:

  • javax.security.auth.Subject.doAs()
  • SecurityManager usage
  • Nashorn JavaScript engine usage
  • Illegal reflection access
  • java.util.Date behavioral changes

The only code fix is in UserService.java: the UpdateUserConstraint annotation used raw Class[] types for groups() and payload(), which should be Class<?>[] and Class<? extends Payload>[] per the Bean Validation contract. This eliminates raw type compiler warnings.

Note: An initial attempt to migrate javax.validationjakarta.validation was reverted because Spring Boot 2.6.3 (the current version) only provides classes under the javax.validation.* Java package. That migration requires upgrading to Spring Boot 3.x first.

Review & Testing Checklist for Human

  • Verify the raw type fix in UpdateUserConstraint compiles correctly (./gradlew compileJava)
  • If a Spring Boot 3.x / Java 17 upgrade is planned, note that 11 files in the application layer will need javax.validationjakarta.validation migration at that time (along with files in api/, graphql/, and other packages)

Notes

  • Only src/main/java/io/spring/application/user/UserService.java was modified; no other application-layer files required changes.
  • build.gradle and test files were not modified per task scoping.

Link to Devin session: https://app.devin.ai/sessions/00c601670ca44b6f9b6580706c90454e
Requested by: @shayanshafii


Open with Devin

…or Java 17

Migrated all javax.validation imports to jakarta.validation namespace
across 11 files in the application layer. This is the primary change
needed for Java 17 compatibility, as Spring Boot 3.x (which requires
Java 17+) uses the Jakarta EE 9+ namespace.

Review findings:
- No javax.security.auth.Subject.doAs() usage found
- No SecurityManager usage found
- No Nashorn JavaScript engine usage found
- No illegal reflection access found
- No java.util.Date patterns that changed found

Files changed:
- article/ArticleCommandService.java
- article/DuplicatedArticleConstraint.java
- article/DuplicatedArticleValidator.java
- article/NewArticleParam.java
- user/DuplicatedEmailConstraint.java
- user/DuplicatedEmailValidator.java
- user/DuplicatedUsernameConstraint.java
- user/DuplicatedUsernameValidator.java
- user/RegisterParam.java
- user/UpdateUserParam.java
- user/UserService.java

Co-Authored-By: shayan <shayan@cognition.ai>
@devin-ai-integration
Copy link
Copy Markdown
Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration Bot and others added 2 commits April 15, 2026 19:48
Replace raw Class[] types with properly parameterized Class<?>[] and
Class<? extends Payload>[] in the UpdateUserConstraint annotation to
match the Bean Validation contract and eliminate raw type warnings.

This was the only code quality issue found during the Java 17 API
review of the application layer. No Java 17 deprecated/removed APIs
(Subject.doAs, SecurityManager, Nashorn, illegal reflection, etc.)
were found in any of the 30 reviewed files.

Co-Authored-By: shayan <shayan@cognition.ai>
@devin-ai-integration devin-ai-integration Bot changed the title Migrate javax.validation to jakarta.validation in application layer for Java 17 Fix raw types in UpdateUserConstraint and document Java 17 API review Apr 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant