Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@
<path>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_core</artifactId>
<version>2.46.0</version>
<version>2.47.0</version>
</path>
<path>
<groupId>com.uber.nullaway</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<String> result = new ArrayList<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down Expand Up @@ -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 =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down