GoogleCloudPlatform / GoogleCloudPlatform/cloud-opensource-java

Check validity of the errors from latest zipkin

Open
#849 0 comments 0 reactions 1 assignee Claimed by @suztomo View on GitHub
Dependency Fix p3
Dominant language
Java
Stars
163
Forks
80
PR merge metrics
No merged PRs in 30d

Description

Check the validity of the enforcer rule when it's applied to [zipkin](https://github.com/openzipkin/zipkin).

The maven-shade-plugin may be missing JsonTreeReader.

# zipkin

```
[ERROR] Linkage Checker rule found 1 error. Linkage error report:
Class zipkin2.internal.gson.internal.bind.JsonTreeReader is not found;
referenced by 1 class file
zipkin2.internal.gson.stream.JsonReader (zipkin-2.16.2-SNAPSHOT.jar)
```

Does this produce a new linkage error? (But the package name indicate `zipkin2.internal.gson.stream.JsonReader` is only for internal use. Identify which public class touches the class.

```
static {
JsonReaderInternalAccess.INSTANCE = new JsonReaderInternalAccess() {
@Override public void promoteNameToValue(JsonReader reader) throws IOException {
if (reader instanceof JsonTreeReader) {
((JsonTreeReader)reader).promoteNameToValue();
return;
}
int p = reader.peeked;
if (p == PEEKED_NONE) {
p = reader.doPeek();
}
if (p == PEEKED_DOUBLE_QUOTED_NAME) {
reader.peeked = PEEKED_DOUBLE_QUOTED;
} else if (p == PEEKED_SINGLE_QUOTED_NAME) {
reader.peeked = PEEKED_SINGLE_QUOTED;
} else if (p == PEEKED_UNQUOTED_NAME) {
reader.peeked = PEEKED_UNQUOTED;
} else {
throw new IllegalStateException(
"Expected a name but was " + reader.peek() + reader.locationString());
}
}
};
}
```

# zipkin-tests

```
[INFO] --- maven-enforcer-plugin:3.0.0-M2:enforce (enforce) @ zipkin-tests ---
[WARNING] Linkage Checker rule found 6 errors. Linkage error report:
Class zipkin2.internal.gson.internal.bind.JsonTreeReader is not found;
referenced by 1 class file
zipkin2.internal.gson.stream.JsonReader (zipkin-2.16.2-SNAPSHOT.jar)
Class kotlin.jvm.functions.Function0 is not found;
referenced by 1 class file
org.junit.jupiter.api.AssertionsKt (junit-jupiter-api-5.5.1.jar)
Class kotlin.jvm.internal.Intrinsics is not found;
referenced by 2 class files
org.junit.jupiter.api.AssertionsKt (junit-jupiter-api-5.5.1.jar)
org.junit.jupiter.params.aggregator.ArgumentsAccessorKt (junit-jupiter-params-5.5.1.jar)
Class kotlin.jvm.internal.Lambda is not found;
referenced by 1 class file
org.junit.jupiter.api.AssertionsKt (junit-jupiter-api-5.5.1.jar)
Class kotlin.collections.CollectionsKt is not found;
referenced by 1 class file
org.junit.jupiter.api.AssertionsKt (junit-jupiter-api-5.5.1.jar)
Class kotlin.collections.ArraysKt is not found;
referenced by 1 class file
org.junit.jupiter.api.AssertionsKt (junit-jupiter-api-5.5.1.jar)
```

They are Kotlin-related classes. JUnit Jupiter is the combination of the new programming model and extension model for writing tests and extensions in JUnit 5.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.