int extraSize = extra.size(); if (extraSize == 0) { extra = Collections.singletonList(createExtraAndClaim(traceId, spanId)); return contextWithExtra(context, extra); consolidated = existing; } else { // otherwise we need to consolidate the fields consolidated = createExtraAndClaim(existing, traceId, spanId); extra.add(createExtraAndClaim(traceId, spanId)); return contextWithExtra(context, Collections.unmodifiableList(extra)); continue; consolidated = createExtraAndClaim(existing, traceId, spanId); extra = ensureMutable(extra); extra.set(i, consolidated); consolidated = createExtraAndClaim(traceId, spanId); extra = ensureMutable(extra); extra.add(consolidated);
int extraSize = extra.size(); if (extraSize == 0) { extra = Collections.singletonList(createExtraAndClaim(traceId, spanId)); return contextWithExtra(context, extra); consolidated = existing; } else { // otherwise we need to consolidate the fields consolidated = createExtraAndClaim(existing, traceId, spanId); extra.add(createExtraAndClaim(traceId, spanId)); return contextWithExtra(context, Collections.unmodifiableList(extra)); continue; consolidated = createExtraAndClaim(existing, traceId, spanId); extra = ensureMutable(extra); extra.set(i, consolidated); consolidated = createExtraAndClaim(traceId, spanId); extra = ensureMutable(extra); extra.add(consolidated);