From 30ad1183aa004b27b62bb165ac05bdff4b44db68 Mon Sep 17 00:00:00 2001
From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com>
Date: Thu, 5 Feb 2026 09:31:41 +0000
Subject: [PATCH 1/2] chore(deps): update dependency
com.google.errorprone:error_prone_core to v2.47.0
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index c5fc1b43a..4e3018de8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -449,7 +449,7 @@
com.google.errorprone
error_prone_core
- 2.46.0
+ 2.47.0
com.uber.nullaway
From 529ff69b6f81f96c0b7d366ef4899304ffc63eb0 Mon Sep 17 00:00:00 2001
From: Gregor Zeitlinger
Date: Thu, 5 Feb 2026 12:13:24 +0100
Subject: [PATCH 2/2] fix
Signed-off-by: Gregor Zeitlinger
---
.../metrics/exporter/common/PrometheusHttpRequest.java | 2 ++
.../prometheus/metrics/exporter/pushgateway/PushGateway.java | 4 ++++
.../metrics/expositionformats/ExpositionFormatWriter.java | 2 ++
3 files changed, 8 insertions(+)
diff --git a/prometheus-metrics-exporter-common/src/main/java/io/prometheus/metrics/exporter/common/PrometheusHttpRequest.java b/prometheus-metrics-exporter-common/src/main/java/io/prometheus/metrics/exporter/common/PrometheusHttpRequest.java
index 3af9996e3..4483fc83f 100644
--- a/prometheus-metrics-exporter-common/src/main/java/io/prometheus/metrics/exporter/common/PrometheusHttpRequest.java
+++ b/prometheus-metrics-exporter-common/src/main/java/io/prometheus/metrics/exporter/common/PrometheusHttpRequest.java
@@ -43,6 +43,8 @@ default String getParameter(String name) {
/** See {@code jakarta.servlet.ServletRequest.getParameterValues(String)} */
@Override
@Nullable
+ // decode with Charset is only available in Java 10+, but we want to support Java 8
+ @SuppressWarnings("JdkObsolete")
default String[] getParameterValues(String name) {
try {
ArrayList result = new ArrayList<>();
diff --git a/prometheus-metrics-exporter-pushgateway/src/main/java/io/prometheus/metrics/exporter/pushgateway/PushGateway.java b/prometheus-metrics-exporter-pushgateway/src/main/java/io/prometheus/metrics/exporter/pushgateway/PushGateway.java
index 72e0561c1..ab2c07ee9 100644
--- a/prometheus-metrics-exporter-pushgateway/src/main/java/io/prometheus/metrics/exporter/pushgateway/PushGateway.java
+++ b/prometheus-metrics-exporter-pushgateway/src/main/java/io/prometheus/metrics/exporter/pushgateway/PushGateway.java
@@ -253,6 +253,8 @@ private void doRequest(@Nullable PrometheusRegistry registry, String method) thr
}
}
+ // toString with Charset is only available in Java 10+, but we want to support Java 8
+ @SuppressWarnings("JdkObsolete")
private static String readFromStream(InputStream is) throws IOException {
ByteArrayOutputStream result = new ByteArrayOutputStream();
byte[] buffer = new byte[1024];
@@ -497,6 +499,8 @@ private Format getFormat() {
return Format.PROMETHEUS_PROTOBUF;
}
+ // encode with Charset is only available in Java 10+, but we want to support Java 8
+ @SuppressWarnings("JdkObsolete")
private URL makeUrl(@Nullable ExporterPushgatewayProperties properties)
throws UnsupportedEncodingException, MalformedURLException {
StringBuilder url =
diff --git a/prometheus-metrics-exposition-textformats/src/main/java/io/prometheus/metrics/expositionformats/ExpositionFormatWriter.java b/prometheus-metrics-exposition-textformats/src/main/java/io/prometheus/metrics/expositionformats/ExpositionFormatWriter.java
index 67f1ee41e..03ac229ca 100644
--- a/prometheus-metrics-exposition-textformats/src/main/java/io/prometheus/metrics/expositionformats/ExpositionFormatWriter.java
+++ b/prometheus-metrics-exposition-textformats/src/main/java/io/prometheus/metrics/expositionformats/ExpositionFormatWriter.java
@@ -20,6 +20,8 @@ default void write(OutputStream out, MetricSnapshots metricSnapshots) throws IOE
}
/** Converts the metric snapshots to a debug string using the specified escaping scheme. */
+ // toString with Charset is only available in Java 10+, but we want to support Java 8
+ @SuppressWarnings("JdkObsolete")
default String toDebugString(MetricSnapshots metricSnapshots, EscapingScheme escapingScheme) {
ByteArrayOutputStream out = new ByteArrayOutputStream();
try {