3636import io .opentelemetry .sdk .profiles .data .LocationData ;
3737import io .opentelemetry .sdk .profiles .data .MappingData ;
3838import io .opentelemetry .sdk .profiles .data .ProfileData ;
39+ import io .opentelemetry .sdk .profiles .data .ProfilesDictionaryData ;
3940import io .opentelemetry .sdk .profiles .data .SampleData ;
4041import io .opentelemetry .sdk .profiles .data .StackData ;
4142import io .opentelemetry .sdk .profiles .data .ValueTypeData ;
42- import io .opentelemetry .sdk .profiles .internal .data .ImmutableFunctionData ;
43- import io .opentelemetry .sdk .profiles .internal .data .ImmutableKeyValueAndUnitData ;
44- import io .opentelemetry .sdk .profiles .internal .data .ImmutableLineData ;
45- import io .opentelemetry .sdk .profiles .internal .data .ImmutableLinkData ;
46- import io .opentelemetry .sdk .profiles .internal .data .ImmutableLocationData ;
47- import io .opentelemetry .sdk .profiles .internal .data .ImmutableMappingData ;
48- import io .opentelemetry .sdk .profiles .internal .data .ImmutableProfileData ;
49- import io .opentelemetry .sdk .profiles .internal .data .ImmutableProfilesDictionaryData ;
50- import io .opentelemetry .sdk .profiles .internal .data .ImmutableSampleData ;
51- import io .opentelemetry .sdk .profiles .internal .data .ImmutableStackData ;
52- import io .opentelemetry .sdk .profiles .internal .data .ImmutableValueTypeData ;
5343import io .opentelemetry .sdk .resources .Resource ;
5444import java .io .ByteArrayOutputStream ;
5545import java .io .IOException ;
@@ -66,7 +56,7 @@ public class ProfilesRequestMarshalerTest {
6656
6757 @ Test
6858 void compareFunctionMarshaling () {
69- FunctionData input = ImmutableFunctionData .create (1 , 2 , 3 , 4 );
59+ FunctionData input = FunctionData .create (1 , 2 , 3 , 4 );
7060 Function builderResult =
7161 Function .newBuilder ()
7262 .setNameStrindex (1 )
@@ -83,8 +73,8 @@ void compareFunctionMarshaling() {
8373 @ Test
8474 void compareRepeatedFunctionMarshaling () {
8575 List <FunctionData > inputs = new ArrayList <>();
86- inputs .add (ImmutableFunctionData .create (1 , 2 , 3 , 4 ));
87- inputs .add (ImmutableFunctionData .create (5 , 6 , 7 , 8 ));
76+ inputs .add (FunctionData .create (1 , 2 , 3 , 4 ));
77+ inputs .add (FunctionData .create (5 , 6 , 7 , 8 ));
8878
8979 List <Function > builderResults = new ArrayList <>();
9080 builderResults .add (
@@ -112,7 +102,7 @@ void compareRepeatedFunctionMarshaling() {
112102
113103 @ Test
114104 void compareLineMarshaling () {
115- LineData input = ImmutableLineData .create (1 , 2 , 3 );
105+ LineData input = LineData .create (1 , 2 , 3 );
116106 Line builderResult = Line .newBuilder ().setFunctionIndex (1 ).setLine (2 ).setColumn (3 ).build ();
117107
118108 Line roundTripResult = parse (Line .getDefaultInstance (), LineMarshaler .create (input ));
@@ -122,8 +112,8 @@ void compareLineMarshaling() {
122112 @ Test
123113 void compareRepeatedLineMarshaling () {
124114 List <LineData > inputs = new ArrayList <>();
125- inputs .add (ImmutableLineData .create (1 , 2 , 3 ));
126- inputs .add (ImmutableLineData .create (4 , 5 , 6 ));
115+ inputs .add (LineData .create (1 , 2 , 3 ));
116+ inputs .add (LineData .create (4 , 5 , 6 ));
127117
128118 List <Line > builderResults = new ArrayList <>();
129119 builderResults .add (Line .newBuilder ().setFunctionIndex (1 ).setLine (2 ).setColumn (3 ).build ());
@@ -139,7 +129,7 @@ void compareRepeatedLineMarshaling() {
139129
140130 @ Test
141131 void compareKeyValueAndUnitMarshaling () {
142- KeyValueAndUnitData input = ImmutableKeyValueAndUnitData .create (1 , Value .of ("foo" ), 3 );
132+ KeyValueAndUnitData input = KeyValueAndUnitData .create (1 , Value .of ("foo" ), 3 );
143133 KeyValueAndUnit builderResult =
144134 KeyValueAndUnit .newBuilder ()
145135 .setKeyStrindex (1 )
@@ -155,8 +145,8 @@ void compareKeyValueAndUnitMarshaling() {
155145 @ Test
156146 void compareRepeatedKeyValueAndUnitMarshaling () {
157147 List <KeyValueAndUnitData > inputs = new ArrayList <>();
158- inputs .add (ImmutableKeyValueAndUnitData .create (1 , Value .of ("foo" ), 3 ));
159- inputs .add (ImmutableKeyValueAndUnitData .create (4 , Value .of ("bar" ), 6 ));
148+ inputs .add (KeyValueAndUnitData .create (1 , Value .of ("foo" ), 3 ));
149+ inputs .add (KeyValueAndUnitData .create (4 , Value .of ("bar" ), 6 ));
160150
161151 List <KeyValueAndUnit > builderResults = new ArrayList <>();
162152 builderResults .add (
@@ -184,7 +174,7 @@ void compareRepeatedKeyValueAndUnitMarshaling() {
184174 void compareLinkMarshaling () {
185175 String traceId = "0123456789abcdef0123456789abcdef" ;
186176 String spanId = "fedcba9876543210" ;
187- LinkData input = ImmutableLinkData .create (traceId , spanId );
177+ LinkData input = LinkData .create (traceId , spanId );
188178 Link builderResult =
189179 Link .newBuilder ()
190180 .setTraceId (ByteString .fromHex (traceId ))
@@ -198,8 +188,8 @@ void compareLinkMarshaling() {
198188 @ Test
199189 void compareRepeatedLinkMarshaling () {
200190 List <LinkData > inputs = new ArrayList <>();
201- inputs .add (ImmutableLinkData .create ("0123456789abcdef0123456789abcdef" , "fedcba9876543210" ));
202- inputs .add (ImmutableLinkData .create ("123456789abcdef0123456789abcdef0" , "edcba9876543210f" ));
191+ inputs .add (LinkData .create ("0123456789abcdef0123456789abcdef" , "fedcba9876543210" ));
192+ inputs .add (LinkData .create ("123456789abcdef0123456789abcdef0" , "edcba9876543210f" ));
203193
204194 List <Link > builderResults = new ArrayList <>();
205195 builderResults .add (
@@ -223,7 +213,7 @@ void compareRepeatedLinkMarshaling() {
223213
224214 @ Test
225215 void compareLocationMarshaling () {
226- LocationData input = ImmutableLocationData .create (1 , 2 , Collections .emptyList (), listOf (4 , 5 ));
216+ LocationData input = LocationData .create (1 , 2 , Collections .emptyList (), listOf (4 , 5 ));
227217 Location builderResult =
228218 Location .newBuilder ()
229219 .setMappingIndex (1 )
@@ -239,8 +229,8 @@ void compareLocationMarshaling() {
239229 @ Test
240230 void compareRepeatedLocationMarshaling () {
241231 List <LocationData > inputs = new ArrayList <>();
242- inputs .add (ImmutableLocationData .create (1 , 2 , Collections .emptyList (), listOf (3 , 4 )));
243- inputs .add (ImmutableLocationData .create (5 , 6 , Collections .emptyList (), listOf (7 , 8 )));
232+ inputs .add (LocationData .create (1 , 2 , Collections .emptyList (), listOf (3 , 4 )));
233+ inputs .add (LocationData .create (5 , 6 , Collections .emptyList (), listOf (7 , 8 )));
244234
245235 List <Location > builderResults = new ArrayList <>();
246236 builderResults .add (
@@ -266,7 +256,7 @@ void compareRepeatedLocationMarshaling() {
266256
267257 @ Test
268258 void compareMappingMarshaling () {
269- MappingData input = ImmutableMappingData .create (1 , 2 , 3 , 4 , listOf (5 , 6 ));
259+ MappingData input = MappingData .create (1 , 2 , 3 , 4 , listOf (5 , 6 ));
270260 Mapping builderResult =
271261 Mapping .newBuilder ()
272262 .setMemoryStart (1 )
@@ -283,8 +273,8 @@ void compareMappingMarshaling() {
283273 @ Test
284274 void compareRepeatedMappingMarshaling () {
285275 List <MappingData > inputs = new ArrayList <>();
286- inputs .add (ImmutableMappingData .create (1 , 2 , 3 , 4 , listOf (5 , 6 )));
287- inputs .add (ImmutableMappingData .create (7 , 8 , 9 , 10 , listOf (11 , 12 )));
276+ inputs .add (MappingData .create (1 , 2 , 3 , 4 , listOf (5 , 6 )));
277+ inputs .add (MappingData .create (7 , 8 , 9 , 10 , listOf (11 , 12 )));
288278
289279 List <Mapping > builderResults = new ArrayList <>();
290280 builderResults .add (
@@ -314,7 +304,7 @@ void compareRepeatedMappingMarshaling() {
314304
315305 @ Test
316306 void compareStackMarshaling () {
317- StackData input = ImmutableStackData .create (listOf (1 , 2 ));
307+ StackData input = StackData .create (listOf (1 , 2 ));
318308 Stack builderResult = Stack .newBuilder ().addAllLocationIndices (listOf (1 , 2 )).build ();
319309
320310 Stack roundTripResult = parse (Stack .getDefaultInstance (), StackMarshaler .create (input ));
@@ -324,8 +314,8 @@ void compareStackMarshaling() {
324314 @ Test
325315 void compareRepeatedStackMarshaling () {
326316 List <StackData > inputs = new ArrayList <>();
327- inputs .add (ImmutableStackData .create (listOf (1 , 2 )));
328- inputs .add (ImmutableStackData .create (listOf (3 , 4 )));
317+ inputs .add (StackData .create (listOf (1 , 2 )));
318+ inputs .add (StackData .create (listOf (3 , 4 )));
329319
330320 List <Stack > builderResults = new ArrayList <>();
331321 builderResults .add (Stack .newBuilder ().addAllLocationIndices (listOf (1 , 2 )).build ());
@@ -344,22 +334,22 @@ void compareResourceProfilesMarshaling() {
344334
345335 String profileId = "0123456789abcdef0123456789abcdef" ;
346336 ProfileData profileContainerData =
347- ImmutableProfileData .create (
337+ ProfileData .create (
348338 Resource .create (Attributes .empty ()),
349339 InstrumentationScopeInfo .create ("testscope" ),
350- ImmutableProfilesDictionaryData .create (
340+ ProfilesDictionaryData .create (
351341 Collections .emptyList (),
352342 Collections .emptyList (),
353343 Collections .emptyList (),
354344 Collections .emptyList (),
355345 Collections .emptyList (),
356346 Collections .emptyList (),
357347 Collections .emptyList ()),
358- ImmutableValueTypeData .create (1 , 2 ),
348+ ValueTypeData .create (1 , 2 ),
359349 Collections .emptyList (),
360350 5L ,
361351 6L ,
362- ImmutableValueTypeData .create (1 , 2 ),
352+ ValueTypeData .create (1 , 2 ),
363353 7L ,
364354 profileId ,
365355 8 ,
@@ -401,8 +391,7 @@ void compareResourceProfilesMarshaling() {
401391
402392 @ Test
403393 void compareSampleMarshaling () {
404- SampleData input =
405- ImmutableSampleData .create (1 , listOf (2 , 3 ), 4 , listOf (5L , 6L ), listOf (7L , 8L ));
394+ SampleData input = SampleData .create (1 , listOf (2 , 3 ), 4 , listOf (5L , 6L ), listOf (7L , 8L ));
406395 Sample builderResult =
407396 Sample .newBuilder ()
408397 .setStackIndex (1 )
@@ -419,9 +408,8 @@ void compareSampleMarshaling() {
419408 @ Test
420409 void compareRepeatedSampleMarshaling () {
421410 List <SampleData > inputs = new ArrayList <>();
422- inputs .add (ImmutableSampleData .create (1 , listOf (2 , 3 ), 4 , listOf (5L , 6L ), listOf (7L , 8L )));
423- inputs .add (
424- ImmutableSampleData .create (11 , listOf (12 , 13 ), 14 , listOf (15L , 16L ), listOf (17L , 18L )));
411+ inputs .add (SampleData .create (1 , listOf (2 , 3 ), 4 , listOf (5L , 6L ), listOf (7L , 8L )));
412+ inputs .add (SampleData .create (11 , listOf (12 , 13 ), 14 , listOf (15L , 16L ), listOf (17L , 18L )));
425413
426414 List <Sample > builderResults = new ArrayList <>();
427415 builderResults .add (
@@ -451,7 +439,7 @@ void compareRepeatedSampleMarshaling() {
451439
452440 @ Test
453441 void compareValueTypeMarshaling () {
454- ValueTypeData input = ImmutableValueTypeData .create (1 , 2 );
442+ ValueTypeData input = ValueTypeData .create (1 , 2 );
455443 ValueType builderResult = ValueType .newBuilder ().setTypeStrindex (1 ).setUnitStrindex (2 ).build ();
456444
457445 ValueType roundTripResult =
@@ -462,8 +450,8 @@ void compareValueTypeMarshaling() {
462450 @ Test
463451 void compareRepeatedValueTypeMarshaling () {
464452 List <ValueTypeData > inputs = new ArrayList <>();
465- inputs .add (ImmutableValueTypeData .create (1 , 2 ));
466- inputs .add (ImmutableValueTypeData .create (3 , 4 ));
453+ inputs .add (ValueTypeData .create (1 , 2 ));
454+ inputs .add (ValueTypeData .create (3 , 4 ));
467455
468456 List <ValueType > builderResults = new ArrayList <>();
469457 builderResults .add (ValueType .newBuilder ().setTypeStrindex (1 ).setUnitStrindex (2 ).build ());
0 commit comments