Skip to content

Commit 0dc8492

Browse files
Update dependency com.google.errorprone:error_prone_core to v2.41.0 (#1482)
This PR contains the following updates: | Package | Change | Age | Confidence | |---|---|---|---| | [com.google.errorprone:error_prone_core](https://errorprone.info) ([source](https://redirect.github.com/google/error-prone)) | `2.40.0` -> `2.41.0` | [![age](https://developer.mend.io/api/mc/badges/age/maven/com.google.errorprone:error_prone_core/2.41.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/com.google.errorprone:error_prone_core/2.40.0/2.41.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Release Notes <details> <summary>google/error-prone (com.google.errorprone:error_prone_core)</summary> ### [`v2.41.0`](https://redirect.github.com/google/error-prone/releases/tag/v2.41.0): Error Prone 2.41.0 New checks: - [EffectivelyPrivate](https://errorprone.info/bugpattern/EffectivelyPrivate): Detect declarations that have `public` or `protected` modifiers, but are effectively private Changes: - Skip BooleanLiteral findings if the target type is boxed ([#&#8203;5134](https://redirect.github.com/google/error-prone/issues/5134)) Full changelog: google/error-prone@v2.40.0...v2.41.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/prometheus/client_java). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS40MC4wIiwidXBkYXRlZEluVmVyIjoiNDEuNDAuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiZGVwZW5kZW5jaWVzIl19--> --------- Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
1 parent 57314b0 commit 0dc8492

File tree

3 files changed

+8
-16
lines changed

3 files changed

+8
-16
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@
274274
<path>
275275
<groupId>com.google.errorprone</groupId>
276276
<artifactId>error_prone_core</artifactId>
277-
<version>2.40.0</version>
277+
<version>2.41.0</version>
278278
</path>
279279
<!-- Other annotation processors go here.
280280

prometheus-metrics-instrumentation-jvm/src/test/java/io/prometheus/metrics/instrumentation/jvm/JvmThreadsMetricsTest.java

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import static io.prometheus.metrics.instrumentation.jvm.TestUtil.convertToOpenMetricsFormat;
44
import static org.assertj.core.api.Assertions.assertThat;
5+
import static org.assertj.core.api.Assumptions.assumeThat;
56
import static org.mockito.Mockito.times;
67
import static org.mockito.Mockito.verify;
78
import static org.mockito.Mockito.when;
@@ -106,10 +107,8 @@ public void testInvalidThreadIds() {
106107
try {
107108
String javaVersion = System.getProperty("java.version"); // Example: "21.0.2"
108109
String majorJavaVersion = javaVersion.replaceAll("\\..*", ""); // Example: "21"
109-
if (Integer.parseInt(majorJavaVersion) >= 21) {
110-
// With Java 21 and newer you can no longer have invalid thread ids.
111-
return;
112-
}
110+
// With Java 21 and newer you can no longer have invalid thread ids.
111+
assumeThat(Integer.parseInt(majorJavaVersion)).isLessThan(21);
113112
} catch (NumberFormatException ignored) {
114113
// ignore
115114
}
@@ -165,7 +164,7 @@ private static class ThreadWithInvalidId extends Thread {
165164

166165
private final long id;
167166

168-
public ThreadWithInvalidId(long id, Runnable runnable) {
167+
private ThreadWithInvalidId(long id, Runnable runnable) {
169168
super(runnable);
170169
setDaemon(true);
171170
this.id = id;
@@ -181,14 +180,7 @@ public long getId() {
181180
}
182181
}
183182

184-
private static class TestRunnable implements Runnable {
185-
186-
private final CountDownLatch countDownLatch;
187-
188-
public TestRunnable(CountDownLatch countDownLatch) {
189-
this.countDownLatch = countDownLatch;
190-
}
191-
183+
private record TestRunnable(CountDownLatch countDownLatch) implements Runnable {
192184
@Override
193185
public void run() {
194186
try {

prometheus-metrics-model/src/test/java/io/prometheus/metrics/model/registry/MultiCollectorNameFilterTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class MultiCollectorNameFilterTest {
1818
private static class Registry extends PrometheusRegistry {
1919
private final AtomicBoolean collectCalled = new AtomicBoolean();
2020

21-
public Registry(List<String> prometheusNames) {
21+
private Registry(List<String> prometheusNames) {
2222
register(
2323
new MultiCollector() {
2424
@Override
@@ -45,7 +45,7 @@ public List<String> getPrometheusNames() {
4545
});
4646
}
4747

48-
public boolean collectCalled() {
48+
private boolean collectCalled() {
4949
return collectCalled.get();
5050
}
5151
}

0 commit comments

Comments
 (0)