mjsax commented on code in PR #17691:
URL: https://github.com/apache/kafka/pull/17691#discussion_r1830060568
##########
streams/src/main/java/org/apache/kafka/streams/processor/internals/TopologyMetadata.java:
##########
@@ -274,11 +274,7 @@ public void pauseTopology(final String topologyName) {
* @return A boolean indicating if the topology is paused.
*/
public boolean isPaused(final String topologyName) {
- if (topologyName == null) {
- return pausedTopologies.contains(UNNAMED_TOPOLOGY);
- } else {
- return pausedTopologies.contains(topologyName);
- }
+ return
pausedTopologies.contains(getTopologyNameOrElseUnnamed(topologyName));
Review Comment:
Side cleanup
##########
streams/src/main/java/org/apache/kafka/streams/processor/internals/TopologyMetadata.java:
##########
@@ -463,7 +459,7 @@ Pattern sourceTopicPattern() {
applyToEachBuilder(b -> {
final String patternString = b.sourceTopicPatternString();
- if (patternString.length() > 0) {
+ if (!patternString.isEmpty()) {
Review Comment:
Side cleanup
##########
streams/src/main/java/org/apache/kafka/streams/processor/internals/TopologyMetadata.java:
##########
@@ -629,11 +625,7 @@ public Collection<NamedTopology> allNamedTopologies() {
* else returns {@code null} if {@code topologyName} is non-null
but no such NamedTopology exists
*/
public InternalTopologyBuilder lookupBuilderForNamedTopology(final String
topologyName) {
- if (topologyName == null) {
- return builders.get(UNNAMED_TOPOLOGY);
- } else {
- return builders.get(topologyName);
- }
+ return builders.get(getTopologyNameOrElseUnnamed(topologyName));
Review Comment:
Side cleanup
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]