Skip to content

server: Rename JudgelsService* to JudgelsApi* and split ServiceUtils - #1029

Merged
fushar merged 1 commit into
masterfrom
rename-service-classes
Oct 3, 2026
Merged

fushar merged 1 commit into
masterfrom
rename-service-classes

Conversation

@fushar

@fushar fushar commented Oct 3, 2026

Copy link
Copy Markdown
Member

After judgels.service became judgels.core (#1028), a few classes still carried the old "service" name. ServiceUtils also mixed two unrelated things: request checks that nearly every resource calls, and file response builders that only a few call.

Rename the JudgelsService* error classes to JudgelsApi*, and split ServiceUtils in two. No method body, package or JSON field changes.

  • JudgelsServiceException → JudgelsApiException and JudgelsServiceError → JudgelsApiError, in judgels.core.api. They are the error an API caller sees: an HTTP status, a message and args.
  • JudgelsServiceExceptionMapper → JudgelsApiExceptionMapper, and the integration-test helper JudgelsServiceErrorDecoder → JudgelsApiErrorDecoder.
  • ServiceUtils → JudgelsRequestChecks (checkFound, checkAllowed) and JudgelsResponseBuilders (buildDownloadResponse, buildMediaResponse), both in judgels.core.
  • Callers change only their imports, plus the qualifier in the 10 resources that call the response builders by class name. Imports are re-sorted in every touched file.

The Gradle module judgels-service-core keeps its name.

After judgels.service became judgels.core, a few classes still carried the old "service" name. ServiceUtils also mixed two unrelated things: request checks that nearly every resource calls, and file response builders that only a few call.

Rename the JudgelsService* error classes to JudgelsApi*, and split ServiceUtils into JudgelsRequestChecks and JudgelsResponseBuilders.
@fushar
fushar merged commit ed21431 into master Oct 3, 2026
4 checks passed
@fushar
fushar deleted the rename-service-classes branch October 3, 2026 14:45
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