Skip to content

Commit

Permalink
Make isFiltered thread safe
Browse files Browse the repository at this point in the history
  • Loading branch information
szczygiel-m committed Aug 23, 2024
1 parent 888fd7e commit 87b4d96
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
import java.util.Optional;
import java.util.Set;

import static java.util.stream.Collectors.toList;

/**
* Implementation note: this class is partially mutable and may be accessed from multiple
* threads involved in message lifecycle, it must be thread safe.
Expand Down Expand Up @@ -208,11 +206,11 @@ public String getSubscription() {
return subscription;
}

public boolean isFiltered() {
public synchronized boolean isFiltered() {
return isFiltered;
}

public void setFiltered(boolean filtered) {
public synchronized void setFiltered(boolean filtered) {
isFiltered = filtered;
}

Expand Down

0 comments on commit 87b4d96

Please sign in to comment.