Some fixes for compilation under java 18 (#4397)
This commit is contained in:
parent
783237805f
commit
e999fa0d5a
|
|
@ -216,10 +216,10 @@ final class StrictContextStorage implements ContextStorage, AutoCloseable {
|
|||
}
|
||||
}
|
||||
|
||||
// Don't care about serialization of this private class.
|
||||
@SuppressWarnings("serial")
|
||||
static class CallerStackTrace extends Throwable {
|
||||
|
||||
private static final long serialVersionUID = 783294061323215387L;
|
||||
|
||||
final String threadName = currentThread().getName();
|
||||
final long threadId = currentThread().getId();
|
||||
final Context context;
|
||||
|
|
|
|||
|
|
@ -15,3 +15,12 @@ dependencies {
|
|||
compileOnly("io.grpc:grpc-protobuf")
|
||||
compileOnly("io.grpc:grpc-stub")
|
||||
}
|
||||
|
||||
tasks {
|
||||
compileJava {
|
||||
with(options) {
|
||||
// Generated code so can't control serialization.
|
||||
compilerArgs.add("-Xlint:-serial")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -68,3 +68,12 @@ sourceSets {
|
|||
java.srcDir("$buildDir/generated/source/wire")
|
||||
}
|
||||
}
|
||||
|
||||
tasks {
|
||||
compileJava {
|
||||
with(options) {
|
||||
// Generated code so can't control serialization.
|
||||
compilerArgs.add("-Xlint:-serial")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,35 +0,0 @@
|
|||
/*
|
||||
* Copyright The OpenTelemetry Authors
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package io.opentelemetry.sdk.metrics.internal.state;
|
||||
|
||||
import io.opentelemetry.sdk.metrics.internal.descriptor.MetricDescriptor;
|
||||
|
||||
/**
|
||||
* There are multiple metrics defined with the same name/identity.
|
||||
*
|
||||
* <p>This class is internal and is hence not for public use. Its APIs are unstable and can change
|
||||
* at any time.
|
||||
*/
|
||||
class DuplicateMetricStorageException extends IllegalArgumentException {
|
||||
private static final long serialVersionUID = 1547329629200005982L;
|
||||
private final MetricDescriptor existing;
|
||||
private final MetricDescriptor conflict;
|
||||
|
||||
DuplicateMetricStorageException(
|
||||
MetricDescriptor existing, MetricDescriptor next, String message) {
|
||||
super(message + " Found previous metric: " + existing + ", cannot register metric: " + next);
|
||||
this.existing = existing;
|
||||
this.conflict = next;
|
||||
}
|
||||
|
||||
public MetricDescriptor getExisting() {
|
||||
return existing;
|
||||
}
|
||||
|
||||
public MetricDescriptor getConflict() {
|
||||
return conflict;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue