Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public String topic() {

final String topic = recordContext.topic();

if (topic.equals(NONEXIST_TOPIC)) {
if (NONEXIST_TOPIC.equals(topic)) {
return null;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,12 @@ public void shouldThrowIllegalStateExceptionOnTopicIfNoRecordContext() {
}
}

@Test
public void shouldNotThrowNullPointerExceptionOnTopicIfRecordContextTopicIsNull() {
context.setRecordContext(new ProcessorRecordContext(0, 0, 0, null, null));
assertThat(context.topic(), nullValue());
}

@Test
public void shouldReturnTopicFromRecordContext() {
assertThat(context.topic(), equalTo(recordContext.topic()));
Expand Down