You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by ro...@apache.org on 2023/07/20 20:06:19 UTC
[pinot] branch master updated: Avoid string splitting wherever possible (#11141)
This is an automated email from the ASF dual-hosted git repository.
rongr pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pinot.git
The following commit(s) were added to refs/heads/master by this push:
new 7e782ddd8b Avoid string splitting wherever possible (#11141)
7e782ddd8b is described below
commit 7e782ddd8be23e4968fc327206679f2304b42ed5
Author: Saurabh Dubey <sa...@gmail.com>
AuthorDate: Fri Jul 21 01:36:12 2023 +0530
Avoid string splitting wherever possible (#11141)
Co-authored-by: Saurabh Dubey <sa...@Saurabhs-MacBook-Pro.local>
---
.../main/java/org/apache/pinot/spi/stream/StreamConfigProperties.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/pinot-spi/src/main/java/org/apache/pinot/spi/stream/StreamConfigProperties.java b/pinot-spi/src/main/java/org/apache/pinot/spi/stream/StreamConfigProperties.java
index 1cc9548a32..b16984a301 100644
--- a/pinot-spi/src/main/java/org/apache/pinot/spi/stream/StreamConfigProperties.java
+++ b/pinot-spi/src/main/java/org/apache/pinot/spi/stream/StreamConfigProperties.java
@@ -124,6 +124,7 @@ public class StreamConfigProperties {
}
public static String getPropertySuffix(String incoming, String propertyPrefix) {
- return incoming.split(propertyPrefix + ".")[1];
+ String prefix = propertyPrefix + DOT_SEPARATOR;
+ return incoming.substring(prefix.length());
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org