jmeter-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [jmeter] dgetzlaf commented on a change in pull request #645: Add escaping for new lines in AbstractInfluxdbMetricsSender
Date Fri, 26 Feb 2021 08:45:30 GMT

dgetzlaf commented on a change in pull request #645:
URL: https://github.com/apache/jmeter/pull/645#discussion_r583473625



##########
File path: src/components/src/main/java/org/apache/jmeter/visualizers/backend/influxdb/AbstractInfluxdbMetricsSender.java
##########
@@ -28,7 +29,11 @@
      * \ to escape List of special characters : commas , equal sign = spaces
      */
     static final String tagToStringValue(String s) {
-        return s.trim().replaceAll(" ", "\\\\ ").replaceAll(",", "\\\\,").replaceAll("=",
"\\\\=");
+        return s.trim()
+                .replaceAll(" ", "\\\\ ")
+                .replaceAll(",", "\\\\,")
+                .replaceAll("=", "\\\\=")
+                .replaceAll("\n", "\\\\n");

Review comment:
       @ham1 thanks for your feedback. I've updated this code block according to your recommendation.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



Mime
View raw message