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.
Describe the bug
DeclarativeConfigPropertyUtil.valueResolverslistsDeclarativeConfigPropertyUtil::getStringListtwice, 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.getStringListappears at index 4 and again at index 8 ofvalueResolvers.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?
getStringListis registered twice.resolveValuereturns the first non-null result (catching onlyDeclarativeConfigException), so the entry at index 8 is never reached: the earliergetStringListat 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.