Skip to content

Commit cf3589e

Browse files
Update errorProneVersion to v2.30.0 (#1408)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Jason Plumb <[email protected]>
1 parent 66bf38a commit cf3589e

File tree

7 files changed

+18
-7
lines changed

7 files changed

+18
-7
lines changed

consistent-sampling/src/main/java/io/opentelemetry/contrib/sampler/consistent/ConsistentProbabilityBasedSampler.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
package io.opentelemetry.contrib.sampler.consistent;
77

8+
import java.util.Locale;
89
import javax.annotation.concurrent.Immutable;
910

1011
/** A consistent sampler that samples with a fixed probability. */
@@ -32,7 +33,7 @@ final class ConsistentProbabilityBasedSampler extends ConsistentSampler {
3233
throw new IllegalArgumentException("Sampling probability must be in range [0.0, 1.0]!");
3334
}
3435
this.description =
35-
String.format("ConsistentProbabilityBasedSampler{%.6f}", samplingProbability);
36+
String.format(Locale.ROOT, "ConsistentProbabilityBasedSampler{%.6f}", samplingProbability);
3637
this.randomGenerator = randomGenerator;
3738

3839
lowerPValue = getLowerBoundP(samplingProbability);

consistent-sampling/src/main/java/io/opentelemetry/contrib/sampler/consistent/ConsistentRateLimitingSampler.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import static java.util.Objects.requireNonNull;
99

1010
import io.opentelemetry.sdk.trace.samplers.Sampler;
11+
import java.util.Locale;
1112
import java.util.concurrent.atomic.AtomicReference;
1213
import java.util.function.LongSupplier;
1314
import javax.annotation.concurrent.Immutable;
@@ -113,8 +114,10 @@ public State(double effectiveWindowCount, double effectiveWindowNanos, long last
113114
}
114115
this.description =
115116
String.format(
117+
Locale.ROOT,
116118
"ConsistentRateLimitingSampler{%.6f, %.6f}",
117-
targetSpansPerSecondLimit, adaptationTimeSeconds);
119+
targetSpansPerSecondLimit,
120+
adaptationTimeSeconds);
118121
this.nanoTimeSupplier = requireNonNull(nanoTimeSupplier);
119122

120123
this.inverseAdaptationTimeNanos = 1e-9 / adaptationTimeSeconds;

dependencyManagement/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ val DEPENDENCY_BOMS = listOf(
1919

2020
val autoServiceVersion = "1.1.1"
2121
val autoValueVersion = "1.11.0"
22-
val errorProneVersion = "2.29.2"
22+
val errorProneVersion = "2.30.0"
2323
val prometheusVersion = "0.16.0"
2424
val mockitoVersion = "4.11.0"
2525
val slf4jVersion = "2.0.16"

inferred-spans/src/main/java/io/opentelemetry/contrib/inferredspans/internal/SamplingProfiler.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
import java.util.Collections;
3737
import java.util.Date;
3838
import java.util.List;
39+
import java.util.Locale;
3940
import java.util.Objects;
4041
import java.util.concurrent.Executors;
4142
import java.util.concurrent.ScheduledExecutorService;
@@ -563,7 +564,7 @@ public void processTraces() throws IOException {
563564

564565
@SuppressWarnings("JavaUtilDate")
565566
private void backupDiagnosticFiles(long eof) throws IOException {
566-
String now = String.format("%tFT%<tT.%<tL", new Date());
567+
String now = String.format(Locale.ROOT, "%tFT%<tT.%<tL", new Date());
567568
Path profilerDir = Paths.get(System.getProperty("java.io.tmpdir"), "profiler");
568569
profilerDir.toFile().mkdir();
569570

inferred-spans/src/main/java/io/opentelemetry/contrib/inferredspans/internal/asyncprofiler/BufferedFile.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
import java.nio.channels.FileChannel;
1515
import java.nio.charset.StandardCharsets;
1616
import java.nio.file.StandardOpenOption;
17+
import java.util.Locale;
1718
import java.util.logging.Level;
1819
import java.util.logging.Logger;
1920
import javax.annotation.Nullable;
@@ -243,7 +244,10 @@ public void ensureRemaining(int minRemaining, int maxRead) throws IOException {
243244
if (minRemaining > buffer.capacity()) {
244245
throw new IllegalStateException(
245246
String.format(
246-
"Length (%d) greater than buffer capacity (%d)", minRemaining, buffer.capacity()));
247+
Locale.ROOT,
248+
"Length (%d) greater than buffer capacity (%d)",
249+
minRemaining,
250+
buffer.capacity()));
247251
}
248252
if (buffer.remaining() < minRemaining) {
249253
read(position(), maxRead);

inferred-spans/src/main/java/io/opentelemetry/contrib/inferredspans/internal/asyncprofiler/JfrParser.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
import java.util.Arrays;
1515
import java.util.HashSet;
1616
import java.util.List;
17+
import java.util.Locale;
1718
import java.util.Objects;
1819
import java.util.Set;
1920
import java.util.logging.Level;
@@ -114,7 +115,7 @@ private int readChunk(int position) throws IOException {
114115
short minor = bufferedFile.getShort();
115116
if (major != 2 || minor != 0) {
116117
throw new IllegalArgumentException(
117-
String.format("Can only parse version 2.0. Was %d.%d", major, minor));
118+
String.format(Locale.ROOT, "Can only parse version 2.0. Was %d.%d", major, minor));
118119
}
119120
long chunkSize = bufferedFile.getLong();
120121
long constantPoolOffset = bufferedFile.getLong();

jfr-connection/src/main/java/io/opentelemetry/contrib/jfr/connection/Recording.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import java.io.InputStream;
1010
import java.text.MessageFormat;
1111
import java.time.Instant;
12+
import java.util.Locale;
1213
import java.util.Objects;
1314
import java.util.concurrent.atomic.AtomicReference;
1415
import javax.annotation.Nullable;
@@ -54,7 +55,7 @@ public enum State {
5455
// {0} is the state the code is trying to transition to.
5556
// {1} are the states that the instance could be in for a valid transition.
5657
private static final MessageFormat illegalStateFormat =
57-
new MessageFormat("Recording state {0} not in [{1}]");
58+
new MessageFormat("Recording state {0} not in [{1}]", Locale.ROOT);
5859

5960
/**
6061
* Helper for formatting the message for an IllegalStateException that may be thrown by methods of

0 commit comments

Comments
 (0)