Skip to content

Fix StringEncoder javadoc Java version and Android condition - #8711

Open
thswlsqls wants to merge 1 commit into
open-telemetry:mainfrom
thswlsqls:docs/unsafe-string-encoder-java-version
Open

Fix StringEncoder javadoc Java version and Android condition#8711
thswlsqls wants to merge 1 commit into
open-telemetry:mainfrom
thswlsqls:docs/unsafe-string-encoder-java-version

Conversation

@thswlsqls

Copy link
Copy Markdown
Contributor

Fixes #8709

Description

  • The javadoc called UnsafeStringEncoder a "Java 8+" implementation, but createIfAvailable() needs the String.value (byte[]) and String.coder fields, which Java 8 does not have, so Java 8 always falls back. The inline comment on the coder lookup already says "this only exists in Java 9+".
  • That wording came from VarHandle string encoder #7701 and was carried over unchanged when Fix StringEncoder javadoc implementation priority order #8621 reordered the same bullet.
  • Separately, Avoid unsafe string encoder on Android #8637 added an Android (Dalvik) early return to createUnsafeEncoder(), but the bullet still listed only the Java version condition. Added it to the same sentence.
  • Updated the matching wording in the UnsafeStringEncoder javadoc and the StringEncoderHolder log message.

Testing done

  • Docs-only, test-exempt: javadoc and one non-asserted Level.FINE log message; no behavior or API change.
  • ./gradlew :exporters:common:check passed — 70 tests (61 test, 8 testSenderProvider, 1 testWithoutUnsafe), 0 failures.
  • No apidiff update: all touched classes are japicmp-excluded io.opentelemetry.exporter.internal.*.

@thswlsqls
thswlsqls marked this pull request as ready for review August 10, 2026 00:39
@thswlsqls
thswlsqls requested a review from a team as a code owner August 10, 2026 00:39
@opentelemetry-pr-dashboard

opentelemetry-pr-dashboard Bot commented Aug 10, 2026

Copy link
Copy Markdown

Pull request dashboard status

Waiting on reviewers · refreshed 2026-08-10 01:36 UTC

Review the latest changes.

Non-blocking check failure: codecov/patch

Status above doesn't look right?
  • Just replied or pushed? Anything around or after the refresh time above may not be picked up yet — give it a few minutes.
  • Anything look wrong? Report it with what you expected; it helps us improve the dashboard.

@codecov

codecov Bot commented Aug 10, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 91.65%. Comparing base (d948e13) to head (37dac01).

Files with missing lines Patch % Lines
...exporter/internal/marshal/StringEncoderHolder.java 0.00% 1 Missing ⚠️

❌ Your patch check has failed because the patch coverage (0.00%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #8711   +/-   ##
=========================================
  Coverage     91.65%   91.65%           
  Complexity    10352    10352           
=========================================
  Files          1003     1003           
  Lines         27210    27210           
  Branches       3199     3199           
=========================================
  Hits          24939    24939           
  Misses         1566     1566           
  Partials        705      705           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

StringEncoder javadoc documents the wrong Java version for UnsafeStringEncoder

1 participant