Skip to content

Commit

Permalink
ran mvn spotless
Browse files Browse the repository at this point in the history
Signed-off-by: khatib tamal <[email protected]>
  • Loading branch information
khatibtamal committed Aug 21, 2024
1 parent 4f25992 commit f8cae7d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@

@Getter
public enum TopicContentType {
CUSTOM("custom"),
RANGE("range");

CUSTOM("custom"),
RANGE("range");

private final String value;

TopicContentType(String value) {
this.value = value;
}
private final String value;

TopicContentType(String value) {
this.value = value;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ public Map<Long, String> readEvents(
Map<Long, String> eventMap = new TreeMap<>();
KafkaConsumer<String, String> consumer;

if (offsetPosition.equals(TopicContentType.RANGE.getValue()) && (rangeOffsetsStart < 0 || rangeOffsetsEnd < 0)) {
if (offsetPosition.equals(TopicContentType.RANGE.getValue())
&& (rangeOffsetsStart < 0 || rangeOffsetsEnd < 0)) {
return eventMap;
}

Expand Down Expand Up @@ -95,7 +96,8 @@ public Map<Long, String> readEvents(
}

if (partitionsAssignment.isEmpty()
|| (offsetPosition.equals(TopicContentType.RANGE.getValue()) && rangeOffsetsStart > rangeOffsetsEnd)) {
|| (offsetPosition.equals(TopicContentType.RANGE.getValue())
&& rangeOffsetsStart > rangeOffsetsEnd)) {
consumer.close();
return eventMap;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,7 @@ void getTopicContentsWhenRangeAndEndOffsetNegative() throws Exception {
@Test
@Order(10)
void getTopicContentsWhenRangeAndStartAndEndOffsetNegative() throws Exception {
String url =
createUrl(RANGE_SELECTION, Integer.MAX_VALUE, -1, -1);
String url = createUrl(RANGE_SELECTION, Integer.MAX_VALUE, -1, -1);

Map<Integer, String> response = getTopicContentsPerformMockRequest(url);

Expand All @@ -190,8 +189,7 @@ void getTopicContentsWhenRangeAndStartOffsetBiggerThanEndOffset() throws Excepti
@Order(12)
void getTopicContentsWhenRangeAndStartAndEndOffsetEqual() throws Exception {
int start = 5;
String url =
createUrl(RANGE_SELECTION, Integer.MAX_VALUE, start, start);
String url = createUrl(RANGE_SELECTION, Integer.MAX_VALUE, start, start);

Map<Integer, String> response = getTopicContentsPerformMockRequest(url);

Expand Down

0 comments on commit f8cae7d

Please sign in to comment.