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
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
</description>

<properties>
<java.version>17</java.version>
<java.version>25</java.version>
</properties>

<dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
</description>

<properties>
<java.version>17</java.version>
<java.version>25</java.version>
</properties>

<dependencies>
Expand Down
2 changes: 1 addition & 1 deletion examples/example-exporter-servlet-tomcat/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</description>

<properties>
<java.version>17</java.version>
<java.version>25</java.version>
</properties>

<dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
import java.io.IOException;
import java.io.InputStream;
import java.net.HttpURLConnection;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
Expand All @@ -34,7 +34,7 @@ public ExporterTest(String sampleApp) throws IOException, URISyntaxException {
Volume.create("it-exporter")
.copy("../../it-" + sampleApp + "/target/" + sampleApp + ".jar");
this.sampleAppContainer =
new GenericContainer<>("openjdk:17")
new GenericContainer<>("openjdk:25")
.withFileSystemBind(sampleAppVolume.getHostPath(), "/app", BindMode.READ_ONLY)
.withWorkingDirectory("/app")
.withLogConsumer(LogConsumer.withPrefix(sampleApp))
Expand Down Expand Up @@ -68,18 +68,18 @@ protected Response scrape(String method, String queryString, String... requestHe
throws IOException {
return scrape(
method,
new URL(
URI.create(
"http://localhost:"
+ sampleAppContainer.getMappedPort(9400)
+ "/metrics?"
+ queryString),
requestHeaders);
}

public static Response scrape(String method, URL url, String... requestHeaders)
public static Response scrape(String method, URI uri, String... requestHeaders)
throws IOException {
long timeoutMillis = TimeUnit.SECONDS.toMillis(5);
HttpURLConnection con = (HttpURLConnection) url.openConnection();
HttpURLConnection con = (HttpURLConnection) uri.toURL().openConnection();
con.setRequestMethod(method);
for (int i = 0; i < requestHeaders.length; i += 2) {
con.setRequestProperty(requestHeaders[i], requestHeaders[i + 1]);
Expand Down Expand Up @@ -111,7 +111,7 @@ public static Response scrape(String method, URL url, String... requestHeaders)
if (exception != null) {
exception.printStackTrace();
}
fail("timeout while getting metrics from " + url);
fail("timeout while getting metrics from " + uri);
return null; // will not happen
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</description>
<properties>
<jetty-server.version>12.1.1</jetty-server.version>
<java.version>17</java.version>
<java.version>25</java.version>
</properties>

<dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</description>

<properties>
<java.version>17</java.version>
<java.version>25</java.version>
</properties>

<dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public void setUp() throws IOException, URISyntaxException {
.withLogConsumer(LogConsumer.withPrefix("pushgateway"))
.waitingFor(Wait.forListeningPort());
sampleAppContainer =
new GenericContainer<>("openjdk:17")
new GenericContainer<>("openjdk:25")
.withFileSystemBind(sampleAppVolume.getHostPath(), "/app", BindMode.READ_ONLY)
.withNetwork(network)
.withWorkingDirectory("/app")
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/it-spring-boot-smoke-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
Spring Smoke Tests
</description>
<properties>
<java.version>17</java.version>
<java.version>25</java.version>
<junit-jupiter.version>5.13.4</junit-jupiter.version>
</properties>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import io.prometheus.client.it.common.ExporterTest;
import io.prometheus.metrics.expositionformats.generated.com_google_protobuf_4_32_1.Metrics;
import java.io.IOException;
import java.net.URL;
import java.net.URI;
import java.util.List;
import java.util.Optional;
import org.junit.jupiter.api.Test;
Expand All @@ -20,7 +20,7 @@ public void testPrometheusProtobufFormat() throws IOException {
ExporterTest.Response response =
ExporterTest.scrape(
"GET",
new URL("http://localhost:8080/actuator/prometheus"),
URI.create("http://localhost:8080/actuator/prometheus"),
"Accept",
"application/vnd.google.protobuf; proto=io.prometheus.client.MetricFamily;"
+ " encoding=delimited");
Expand Down
2 changes: 1 addition & 1 deletion mise.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tools]
"go:github.com/gohugoio/hugo" = "v0.150.1"
"go:github.com/grafana/oats" = "0.4.1"
java = "temurin-21.0.8+9.0.LTS"
java = "temurin-25.0.0+36.0.LTS"
lychee = "0.20.1"
protoc = "32.1"

Expand Down
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -252,9 +252,9 @@
<release>${java.version}</release>
<source>${java.version}</source>
<target>${java.version}</target>
<testRelease>17</testRelease>
<testSource>17</testSource>
<testTarget>17</testTarget>
<testRelease>25</testRelease>
<testSource>25</testSource>
<testTarget>25</testTarget>
<showWarnings>true</showWarnings>
<compilerArgs>
<arg>-Xlint:all,-serial,-processing,-options</arg>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import java.net.InetSocketAddress;
import java.net.Socket;
import java.nio.charset.StandardCharsets;
import java.security.AccessController;
import java.security.NoSuchAlgorithmException;
import java.security.Principal;
import java.util.concurrent.Executors;
Expand Down Expand Up @@ -46,7 +45,7 @@ public Result authenticate(HttpExchange exchange) {
HttpHandler handler =
exchange -> {
boolean found = false;
Subject current = Subject.getSubject(AccessController.getContext());
Subject current = Subject.current();
for (Principal p : current.getPrincipals()) {
if (user.equals(p.getName())) {
found = true;
Expand Down
2 changes: 1 addition & 1 deletion prometheus-metrics-exporter-servlet-jakarta/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<properties>
<automatic.module.name>io.prometheus.metrics.exporter.servlet.jakarta</automatic.module.name>
<java.version>17</java.version>
<java.version>25</java.version>
</properties>

<dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ class JvmMemoryMetricsTest {
private final MemoryUsage memoryUsagePoolCollectionEdenSpace = Mockito.mock(MemoryUsage.class);
private final MemoryUsage memoryUsagePoolCollectionOldGen = Mockito.mock(MemoryUsage.class);

@SuppressWarnings("deprecation")
@BeforeEach
public void setUp() {
when(mockMemoryBean.getHeapMemoryUsage()).thenReturn(memoryUsageHeap);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ private ThreadWithInvalidId(long id, Runnable runnable) {
* Note that only Java versions < 21 call this to get the thread id. With Java 21 and newer it's
* no longer possible to make an invalid thread id.
*/
@SuppressWarnings("deprecation")
@Override
public long getId() {
return this.id;
Expand Down