Skip to content

Commit bda88db

Browse files
committed
style: remove unthrown exception
1 parent 46855cd commit bda88db

File tree

1 file changed

+2
-6
lines changed
  • java-server/src/main/java/com/ditto/example/spring/quickstart/service

1 file changed

+2
-6
lines changed

java-server/src/main/java/com/ditto/example/spring/quickstart/service/DittoService.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,7 @@ public Flux<Boolean> getSyncState() {
100100

101101
public void toggleSync() {
102102
boolean currentSyncState = Boolean.TRUE.equals(mutableSyncStatePublisher.asFlux().blockFirst());
103-
try {
104-
setSyncStateIntoDittoStore(!currentSyncState);
105-
} catch (DittoException e) {
106-
throw new RuntimeException(e);
107-
}
103+
setSyncStateIntoDittoStore(!currentSyncState);
108104
}
109105

110106
private DittoAsyncCancellable observePeersPresence() {
@@ -172,7 +168,7 @@ private DittoStoreObserver setupAndObserveSyncState() {
172168
}
173169
}
174170

175-
private void setSyncStateIntoDittoStore(boolean newState) throws DittoException {
171+
private void setSyncStateIntoDittoStore(boolean newState) {
176172
CompletionStage<DittoQueryResult> future = ditto.getStore().execute(
177173
"UPDATE %s SET %s = :syncState".formatted(DITTO_SYNC_STATE_COLLECTION, DITTO_SYNC_STATE_ID),
178174
DittoCborSerializable.buildDictionary()

0 commit comments

Comments
 (0)