Skip to content

Duplicate getStringList resolver in DeclarativeConfigPropertyUtil #8569

Description

@thswlsqls

Describe the bug

DeclarativeConfigPropertyUtil.valueResolvers lists DeclarativeConfigPropertyUtil::getStringList twice, so the list holds a duplicate, unreachable resolver entry.

Steps to reproduce

Read api/incubator/src/main/java/io/opentelemetry/api/incubator/config/DeclarativeConfigPropertyUtil.java. getStringList appears at index 4 and again at index 8 of valueResolvers.

What did you expect to see?

Each of the ten resolver methods (getString, getBoolean, getLong, getDouble, getStringList, getBooleanList, getLongList, getDoubleList, getStructuredList, getStructured) referenced exactly once.

What did you see instead?

getStringList is registered twice. resolveValue returns the first non-null result (catching only DeclarativeConfigException), so the entry at index 8 is never reached: the earlier getStringList at index 4 already handles any string-list key. It is dead code with no behavior effect, but the resolver list no longer matches the resolver methods one-to-one.

What version and what artifacts are you using?
Artifacts: opentelemetry-api-incubator
Version: main @ 4d974ba
How did you reference these artifacts? N/A

Environment
Compiler: Temurin 21
OS: N/A

Additional context
Package-private internal util in an -alpha artifact; no public API or observable behavior change. Fix is removing the duplicate line.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions