Skip to content

Conversation

@phatblat
Copy link
Member

@phatblat phatblat commented Dec 4, 2025

Version 5.0.0-java-rc.2 of the Java SDK changed the API, renaming DittoError to DittoException.

@phatblat phatblat self-assigned this Dec 4, 2025
Copilot AI review requested due to automatic review settings December 4, 2025 22:44
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR upgrades the ditto-java SDK from version 5.0.0-preview.3 to 5.0.0-java-rc.2, which introduces a breaking API change renaming DittoError to DittoException. The refactoring updates exception handling throughout the codebase to accommodate this change.

Key changes:

  • Updated ditto-java dependency versions in build configuration
  • Renamed all DittoError references to DittoException in exception handling blocks
  • Modified itemToTask method to declare throws DittoException and added exception handling in its caller

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
build.gradle.kts Updated ditto-java and ditto-binaries dependencies from 5.0.0-preview.3 to 5.0.0-java-rc.2, including commented examples
DittoService.java Replaced all DittoError catch blocks with DittoException (5 occurrences)
DittoTaskService.java Updated exception handling from DittoError to DittoException, modified itemToTask signature, and refactored observeAll method's error handling

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

)
.toCompletableFuture()
.join();
} catch (Error e) {
Copy link

Copilot AI Dec 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The addTask method should catch DittoException in addition to Error for consistency with the SDK upgrade. The toggleTaskDone method at line 92 correctly catches both Error | DittoException, and this pattern should be applied here as well since the Ditto store operations can throw DittoException.

Copilot uses AI. Check for mistakes.
phatblat and others added 8 commits December 11, 2025 11:31
…service/DittoTaskService.java

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
# Conflicts:
#	java-server/src/main/java/com/ditto/example/spring/quickstart/service/DittoService.java
#	java-server/src/main/java/com/ditto/example/spring/quickstart/service/DittoTaskService.java
@phatblat phatblat force-pushed the ben/sdks-2238/java-5.0.0-java-rc.2 branch from 157d1a8 to 44e56cb Compare December 11, 2025 18:32
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.

4 participants