Skip to content

Commit d06c3b0

Browse files
committed
SonarQube fixes
1 parent ff46962 commit d06c3b0

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

api/src/main/java/io/kafbat/ui/service/metrics/scrape/jmx/JmxMetricsFormatter.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,6 @@ private static LinkedHashMap<String, String> getLabelsMap(ObjectName mbeanName)
7474
LinkedHashMap<String, String> keyProperties = new LinkedHashMap<>();
7575
String properties = mbeanName.getKeyPropertyListString();
7676

77-
if (properties.length() > 1024) {
78-
throw new IllegalArgumentException("MBean key property list too long: " + properties);
79-
}
80-
8177
if (!properties.isBlank()) {
8278
Matcher match = PROPERTY_PATTERN.matcher(properties);
8379
while (match.lookingAt()) {

api/src/main/java/io/kafbat/ui/service/metrics/scrape/prometheus/PrometheusTextFormatParser.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public class PrometheusTextFormatParser {
3838

3939
// Regex to capture metric name, optional labels, value, and optional timestamp.
4040
// Groups: 1=name, 2=labels (content), 3=value, 4=timestamp
41-
private static final Pattern METRIC_LINE_PATTERN = Pattern.compile(
41+
private static final Pattern METRIC_LINE_PATTERN = Pattern.compile( // NOSONAR
4242
"^([a-zA-Z_:][a-zA-Z0-9_:]*)" // Metric name
4343
+ "(?:\\{([^}]*)})?" // Optional labels (content in group 2)
4444
+ "\\s+"

0 commit comments

Comments
 (0)