Skip to content

Commit 8c551d6

Browse files
Bump com.google.errorprone:error_prone_core from 2.37.0 to 2.38.0 (#1332)
Bumps [com.google.errorprone:error_prone_core](https://github.com/google/error-prone) from 2.37.0 to 2.38.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/google/error-prone/releases">com.google.errorprone:error_prone_core's releases</a>.</em></p> <blockquote> <h2>Error Prone 2.38.0</h2> <p>New checks:</p> <ul> <li><a href="https://errorprone.info/bugpattern/AddNullMarkedToPackageInfo"><code>AddNullMarkedToPackageInfo</code></a>: adds <a href="https://jspecify.dev/docs/api/org/jspecify/annotations/NullMarked.html"><code>@org.jspecify.annotations.NullMarked</code></a> annotation to package-info files</li> <li><a href="https://errorprone.info/bugpattern/IntLiteralCast"><code>IntLiteralCast</code></a>: Suggests a literal of the desired type instead of casting an int literal to a long, float, or double</li> <li><a href="https://errorprone.info/bugpattern/MisleadingEmptyVarargs"><code>MisleadingEmptyVarargs</code></a>: Discourages calling varargs methods that expect at least one argument with no arguments, like Mockito's <code>thenThrow</code></li> <li><a href="https://errorprone.info/bugpattern/PreconditionsExpensiveString"><code>PreconditionsExpensiveString</code></a>: Discourages expensive string formatting in Guava <code>Preconditions</code> checks</li> <li><a href="https://errorprone.info/bugpattern/SelfSet"><code>SelfSet</code></a>: Detects mistakes like <code>proto.setFoo(proto.getFoo())</code></li> <li><a href="https://errorprone.info/bugpattern/UnnecessaryCopy"><code>UnnecessaryCopy</code></a>: detect unnecessary copies of proto Lists and Maps.</li> </ul> <p>Closed issues: <a href="https://redirect.github.com/google/error-prone/issues/4924">#4924</a>, <a href="https://redirect.github.com/google/error-prone/issues/4897">#4897</a>, <a href="https://redirect.github.com/google/error-prone/issues/4995">#4995</a></p> <p>Full changelog: <a href="https://github.com/google/error-prone/compare/v2.37.0...v2.38.0">https://github.com/google/error-prone/compare/v2.37.0...v2.38.0</a></p> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/google/error-prone/commit/a07bd3e24904d287bfb5a4c0cc01552ff5589d81"><code>a07bd3e</code></a> Release Error Prone 2.38.0</li> <li><a href="https://github.com/google/error-prone/commit/09fd394fb3eb350ca3785ee28b253add2ef7bbf3"><code>09fd394</code></a> Fix typo in NullTernary.md</li> <li><a href="https://github.com/google/error-prone/commit/4171fd71ceed57e27ac63a6d3180ff704b340dce"><code>4171fd7</code></a> FindIdentifiers: find binding variables declared by enclosing or earlier <code>if</code>...</li> <li><a href="https://github.com/google/error-prone/commit/d78f515d82c884f7c2ea4f936695184f7fd5e1aa"><code>d78f515</code></a> Audit each use of ElementKind.LOCAL_VARIABLE, and add BINDING_VARIABLE if app...</li> <li><a href="https://github.com/google/error-prone/commit/6f94a97b8edd9d1d468151fa8dc907e6bef23634"><code>6f94a97</code></a> Tolerate default cases in switches as being present to handle version skew</li> <li><a href="https://github.com/google/error-prone/commit/0223abb5ed30268e6519fe8928acc4e03357349d"><code>0223abb</code></a> Support <code>@LenientFormatString</code> in <code>LenientFormatStringValidation</code>.</li> <li><a href="https://github.com/google/error-prone/commit/cb7dfafdca02d5f0a2b3e6b838a8a3efc3e716d3"><code>cb7dfaf</code></a> Remove the <code>Side</code> enum.</li> <li><a href="https://github.com/google/error-prone/commit/d64c9cee1802f647e086e741df2df13f785b0170"><code>d64c9ce</code></a> Promote error prone check TestExceptionChecker to ERROR within Google (blaze ...</li> <li><a href="https://github.com/google/error-prone/commit/c0ce4751516d17934436533398d6a5fa250c5867"><code>c0ce475</code></a> Move <code>TargetType</code> to a top-level class alongside <code>ASTHelpers</code>.</li> <li><a href="https://github.com/google/error-prone/commit/90b8efb3b7f46d95451cd3097537b8089a07af0f"><code>90b8efb</code></a> Allow binding to BINDING_VARIABLEs in GuardedByBinder.</li> <li>Additional commits viewable in <a href="https://github.com/google/error-prone/compare/v2.37.0...v2.38.0">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=com.google.errorprone:error_prone_core&package-manager=maven&previous-version=2.37.0&new-version=2.38.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> --------- Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: Gregor Zeitlinger <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Gregor Zeitlinger <[email protected]>
1 parent 8d80d77 commit 8c551d6

File tree

3 files changed

+21
-26
lines changed

3 files changed

+21
-26
lines changed

integration-tests/it-common/src/test/java/io/prometheus/client/it/common/LogConsumer.java

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,10 @@ public static LogConsumer withPrefix(String prefix) {
1919
@Override
2020
public void accept(OutputFrame outputFrame) {
2121
switch (outputFrame.getType()) {
22-
case STDOUT:
23-
System.out.print(prefix + " - " + outputFrame.getUtf8String());
24-
break;
25-
case END:
26-
System.out.println(prefix + " - END");
27-
break;
28-
default: // STDERR or unexpected
29-
System.err.print(prefix + " - " + outputFrame.getUtf8String());
30-
break;
22+
case STDOUT -> System.out.print(prefix + " - " + outputFrame.getUtf8String());
23+
case END -> System.out.println(prefix + " - END");
24+
default -> // STDERR or unexpected
25+
System.err.print(prefix + " - " + outputFrame.getUtf8String());
3126
}
3227
}
3328
}

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@
373373
<path>
374374
<groupId>com.google.errorprone</groupId>
375375
<artifactId>error_prone_core</artifactId>
376-
<version>2.37.0</version>
376+
<version>2.38.0</version>
377377
</path>
378378
<!-- Other annotation processors go here.
379379

prometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/HistogramSnapshotTest.java

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -105,18 +105,18 @@ public void testGoodCaseComplete() {
105105
int i = 0;
106106
for (ClassicHistogramBucket bucket : data.getClassicBuckets()) {
107107
switch (i++) {
108-
case 0:
108+
case 0 -> {
109109
assertThat(bucket.getUpperBound()).isEqualTo(128.0);
110110
assertThat(bucket.getCount()).isEqualTo(7);
111-
break;
112-
case 1:
111+
}
112+
case 1 -> {
113113
assertThat(bucket.getUpperBound()).isEqualTo(1024.0);
114114
assertThat(bucket.getCount()).isEqualTo(15);
115-
break;
116-
case 2:
115+
}
116+
case 2 -> {
117117
assertThat(bucket.getUpperBound()).isEqualTo(Double.POSITIVE_INFINITY);
118118
assertThat(bucket.getCount()).isZero();
119-
break;
119+
}
120120
}
121121
}
122122
assertThat(i).as("expecting 3 classic histogram buckets").isEqualTo(3);
@@ -128,33 +128,33 @@ public void testGoodCaseComplete() {
128128
i = 0;
129129
for (NativeHistogramBucket bucket : data.getNativeBucketsForPositiveValues()) {
130130
switch (i++) {
131-
case 0:
131+
case 0 -> {
132132
assertThat(bucket.getBucketIndex()).isOne();
133133
assertThat(bucket.getCount()).isEqualTo(12);
134-
break;
135-
case 1:
134+
}
135+
case 1 -> {
136136
assertThat(bucket.getBucketIndex()).isEqualTo(2);
137137
assertThat(bucket.getCount()).isEqualTo(3);
138-
break;
139-
case 2:
138+
}
139+
case 2 -> {
140140
assertThat(bucket.getBucketIndex()).isEqualTo(4);
141141
assertThat(bucket.getCount()).isEqualTo(2);
142-
break;
142+
}
143143
}
144144
}
145145
assertThat(i).as("expecting 3 native buckets for positive values").isEqualTo(3);
146146
i = 0;
147147
assertThat(data.getNativeBucketsForNegativeValues().size()).isEqualTo(2);
148148
for (NativeHistogramBucket bucket : data.getNativeBucketsForNegativeValues()) {
149149
switch (i++) {
150-
case 0:
150+
case 0 -> {
151151
assertThat(bucket.getBucketIndex()).isEqualTo(-1);
152152
assertThat(bucket.getCount()).isOne();
153-
break;
154-
case 1:
153+
}
154+
case 1 -> {
155155
assertThat(bucket.getBucketIndex()).isZero();
156156
assertThat(bucket.getCount()).isEqualTo(2);
157-
break;
157+
}
158158
}
159159
}
160160
assertThat(i).as("expecting 2 native buckets for positive values").isEqualTo(2);

0 commit comments

Comments
 (0)