@@ -57,9 +57,9 @@ class CompositePropagationFactory extends Propagation.Factory implements Propaga
57
57
this .injectors = stream (this .injectorFactories ).map (Factory ::get ).toList ();
58
58
this .extractors = stream (extractorFactories ).map (Factory ::get ).toList ();
59
59
this .supportsJoin = Stream .concat (stream (this .injectorFactories ), stream (this .extractorFactories ))
60
- .allMatch (Factory ::supportsJoin );
60
+ .allMatch (Factory ::supportsJoin );
61
61
this .requires128BitTraceId = Stream .concat (stream (this .injectorFactories ), stream (this .extractorFactories ))
62
- .anyMatch (Factory ::requires128BitTraceId );
62
+ .anyMatch (Factory ::requires128BitTraceId );
63
63
}
64
64
65
65
Iterable <Factory > getInjectorFactories () {
@@ -69,9 +69,9 @@ Iterable<Factory> getInjectorFactories() {
69
69
@ Override
70
70
public List <String > keys () {
71
71
return Stream .concat (this .injectors .stream (), this .extractors .stream ())
72
- .flatMap ((entry ) -> entry .keys ().stream ())
73
- .distinct ()
74
- .toList ();
72
+ .flatMap ((entry ) -> entry .keys ().stream ())
73
+ .distinct ()
74
+ .toList ();
75
75
}
76
76
77
77
@ Override
@@ -130,23 +130,25 @@ public TraceContext decorate(TraceContext context) {
130
130
}
131
131
132
132
/**
133
- * Creates a new {@link CompositePropagationFactory}, which uses the given {@code injectionTypes} for injection and all supported
134
- * types for extraction.
135
- *
133
+ * Creates a new {@link CompositePropagationFactory}, which uses the given
134
+ * {@code injectionTypes} for injection and all supported types for extraction.
136
135
* @param baggageManager the baggage manager to use, or {@code null}
137
136
* @param injectionTypes the propagation types for injection
138
137
* @return the {@link CompositePropagationFactory}
139
138
*/
140
- static CompositePropagationFactory create (BaggageManager baggageManager , Iterable <TracingProperties .Propagation .PropagationType > injectionTypes ) {
141
- List <Factory > injectors = stream (injectionTypes ).map ((injector ) -> factoryForType (baggageManager , injector )).toList ();
142
- List <Factory > extractors = Arrays .stream (TracingProperties .Propagation .PropagationType .values ()).map ((extractor ) -> factoryForType (baggageManager , extractor )).toList ();
139
+ static CompositePropagationFactory create (BaggageManager baggageManager ,
140
+ Iterable <TracingProperties .Propagation .PropagationType > injectionTypes ) {
141
+ List <Factory > injectors = stream (injectionTypes ).map ((injection ) -> factoryForType (baggageManager , injection ))
142
+ .toList ();
143
+ List <Factory > extractors = Arrays .stream (TracingProperties .Propagation .PropagationType .values ())
144
+ .map ((extraction ) -> factoryForType (baggageManager , extraction ))
145
+ .toList ();
143
146
return new CompositePropagationFactory (injectors , extractors );
144
147
}
145
148
146
149
/**
147
- * Creates a new {@link CompositePropagationFactory}, which uses the given {@code injectionTypes} for injection and all supported
148
- * types for extraction.
149
- *
150
+ * Creates a new {@link CompositePropagationFactory}, which uses the given
151
+ * {@code injectionTypes} for injection and all supported types for extraction.
150
152
* @param injectionTypes the propagation types for injection
151
153
* @return the {@link CompositePropagationFactory}
152
154
*/
@@ -158,7 +160,8 @@ private static <T> Stream<T> stream(Iterable<T> iterable) {
158
160
return StreamSupport .stream (iterable .spliterator (), false );
159
161
}
160
162
161
- private static Factory factoryForType (BaggageManager baggageManager , TracingProperties .Propagation .PropagationType type ) {
163
+ private static Factory factoryForType (BaggageManager baggageManager ,
164
+ TracingProperties .Propagation .PropagationType type ) {
162
165
return switch (type ) {
163
166
case B3 -> b3Single ();
164
167
case B3_MULTI -> b3Multi ();
@@ -168,7 +171,6 @@ private static Factory factoryForType(BaggageManager baggageManager, TracingProp
168
171
169
172
/**
170
173
* Creates a new B3 propagation factory using a single B3 header.
171
- *
172
174
* @return the B3 propagation factory
173
175
*/
174
176
private static Factory b3Single () {
@@ -177,7 +179,6 @@ private static Factory b3Single() {
177
179
178
180
/**
179
181
* Creates a new B3 propagation factory using multiple B3 headers.
180
- *
181
182
* @return the B3 propagation factory
182
183
*/
183
184
private static Factory b3Multi () {
@@ -186,7 +187,6 @@ private static Factory b3Multi() {
186
187
187
188
/**
188
189
* Creates a new W3C propagation factory.
189
- *
190
190
* @param baggageManager baggage manager to use, or {@code null}
191
191
* @return the W3C propagation factory
192
192
*/
@@ -195,5 +195,4 @@ private static W3CPropagation w3c(BaggageManager baggageManager) {
195
195
: new W3CPropagation ();
196
196
}
197
197
198
-
199
198
}
0 commit comments