You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by cs...@apache.org on 2019/12/23 16:54:03 UTC
[sling-org-apache-sling-distribution-journal] branch master
updated: SLING-8908 - Remove unnecessary if
This is an automated email from the ASF dual-hosted git repository.
cschneider pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-distribution-journal.git
The following commit(s) were added to refs/heads/master by this push:
new 251b88a SLING-8908 - Remove unnecessary if
251b88a is described below
commit 251b88a58231e91e480a4770d4f573d3ade215a1
Author: Christian Schneider <cs...@adobe.com>
AuthorDate: Mon Dec 23 17:53:49 2019 +0100
SLING-8908 - Remove unnecessary if
---
.../distribution/journal/impl/subscriber/CommandPoller.java | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/src/main/java/org/apache/sling/distribution/journal/impl/subscriber/CommandPoller.java b/src/main/java/org/apache/sling/distribution/journal/impl/subscriber/CommandPoller.java
index 10186a7..c05292e 100644
--- a/src/main/java/org/apache/sling/distribution/journal/impl/subscriber/CommandPoller.java
+++ b/src/main/java/org/apache/sling/distribution/journal/impl/subscriber/CommandPoller.java
@@ -38,14 +38,12 @@ public class CommandPoller implements Closeable {
private final String subSlingId;
private final String subAgentName;
- private final boolean editable;
private final Closeable commandPoller;
private final AtomicLong clearOffset = new AtomicLong(-1);
public CommandPoller(MessagingProvider messagingProvider, Topics topics, String subSlingId, String subAgentName, boolean editable) {
this.subSlingId = subSlingId;
this.subAgentName = subAgentName;
- this.editable = editable;
if (editable) {
/*
@@ -84,13 +82,8 @@ public class CommandPoller implements Closeable {
}
private void handleClearCommand(long offset) {
- if (editable) {
- updateClearOffsetIfLarger(offset);
- LOG.info("Handled clear command for offset {}", offset);
- } else {
- LOG.warn("Unexpected ClearCommand for non editable subscriber");
- }
-
+ updateClearOffsetIfLarger(offset);
+ LOG.info("Handled clear command for offset {}", offset);
}
private long updateClearOffsetIfLarger(long offset) {