@@ -120,8 +120,8 @@ public PulseApiImpl(
120120 if (optionalResponse .isPresent ()) {
121121 return optionalResponse .get ();
122122 }
123- final PulseEntity existingPulseEntity = pulseExtractor .getPulseEntity ();
124- synchronized ( existingPulseEntity . getLock ()) {
123+ synchronized ( pulseExtractor .getLock ()) {
124+ final PulseEntity existingPulseEntity = pulseExtractor . getPulseEntity ();
125125 final UUID id = combiner .getId ();
126126 final @ NotNull Optional <DataCombiner > optionalDataCombiner = assetMappingExtractor .getCombinerById (id );
127127 if (optionalDataCombiner .isPresent ()) {
@@ -192,8 +192,8 @@ public PulseApiImpl(
192192 if (mappingId == null ) {
193193 return ErrorResponseUtil .errorResponse (new InvalidManagedAssetMappingIdError ("null" ));
194194 }
195- final PulseEntity existingPulseEntity = pulseExtractor .getPulseEntity ();
196- synchronized ( existingPulseEntity . getLock ()) {
195+ synchronized ( pulseExtractor .getLock ()) {
196+ final PulseEntity existingPulseEntity = pulseExtractor . getPulseEntity ();
197197 final PulseAgentAssets assets =
198198 PulseAgentAssets .fromPersistence (existingPulseEntity .getPulseAssetsEntity ());
199199 final OptionalInt optionalAssetIndex = IntStream .range (0 , assets .size ())
@@ -231,8 +231,8 @@ public PulseApiImpl(
231231 if (optionalResponse .isPresent ()) {
232232 return optionalResponse .get ();
233233 }
234- final PulseEntity existingPulseEntity = pulseExtractor .getPulseEntity ();
235- synchronized ( existingPulseEntity . getLock ()) {
234+ synchronized ( pulseExtractor .getLock ()) {
235+ final PulseEntity existingPulseEntity = pulseExtractor . getPulseEntity ();
236236 final @ NotNull Optional <DataCombiner > optionalDataCombiner =
237237 assetMappingExtractor .getCombinerById (combinerId );
238238 if (optionalDataCombiner .isEmpty ()) {
@@ -275,8 +275,8 @@ public PulseApiImpl(
275275 if (optionalResponse .isPresent ()) {
276276 return optionalResponse .get ();
277277 }
278- final PulseEntity existingPulseEntity = pulseExtractor .getPulseEntity ();
279- synchronized ( existingPulseEntity . getLock ()) {
278+ synchronized ( pulseExtractor .getLock ()) {
279+ final PulseEntity existingPulseEntity = pulseExtractor . getPulseEntity ();
280280 final PulseAgentAssets assets =
281281 PulseAgentAssets .fromPersistence (existingPulseEntity .getPulseAssetsEntity ());
282282 final OptionalInt optionalAssetIndex = IntStream .range (0 , assets .size ())
@@ -329,8 +329,7 @@ public PulseApiImpl(
329329
330330 @ Override
331331 public @ NotNull Response getAssetMapper (final @ NotNull UUID combinerId ) {
332- final PulseEntity existingPulseEntity = pulseExtractor .getPulseEntity ();
333- synchronized (existingPulseEntity .getLock ()) {
332+ synchronized (pulseExtractor .getLock ()) {
334333 final @ NotNull Optional <DataCombiner > optionalDataCombiner =
335334 assetMappingExtractor .getCombinerById (combinerId );
336335 if (optionalDataCombiner .isEmpty ()) {
@@ -342,8 +341,7 @@ public PulseApiImpl(
342341
343342 @ Override
344343 public @ NotNull Response getAssetMapperInstructions (final @ NotNull UUID combinerId , final @ NotNull UUID mappingId ) {
345- final PulseEntity existingPulseEntity = pulseExtractor .getPulseEntity ();
346- synchronized (existingPulseEntity .getLock ()) {
344+ synchronized (pulseExtractor .getLock ()) {
347345 final @ NotNull Optional <DataCombiner > optionalDataCombiner =
348346 assetMappingExtractor .getCombinerById (combinerId );
349347 if (optionalDataCombiner .isEmpty ()) {
@@ -362,8 +360,7 @@ public PulseApiImpl(
362360
363361 @ Override
364362 public @ NotNull Response getAssetMapperMappings (final @ NotNull UUID combinerId ) {
365- final PulseEntity existingPulseEntity = pulseExtractor .getPulseEntity ();
366- synchronized (existingPulseEntity .getLock ()) {
363+ synchronized (pulseExtractor .getLock ()) {
367364 final @ NotNull Optional <DataCombiner > optionalDataCombiner =
368365 assetMappingExtractor .getCombinerById (combinerId );
369366 if (optionalDataCombiner .isEmpty ()) {
@@ -380,8 +377,7 @@ public PulseApiImpl(
380377
381378 @ Override
382379 public @ NotNull Response getAssetMappers () {
383- final PulseEntity existingPulseEntity = pulseExtractor .getPulseEntity ();
384- synchronized (existingPulseEntity .getLock ()) {
380+ synchronized (pulseExtractor .getLock ()) {
385381 final List <DataCombiner > allCombiners = assetMappingExtractor .getAllCombiners ();
386382 final List <Combiner > combiners = allCombiners .stream ().map (DataCombiner ::toModel ).toList ();
387383 final CombinerList combinerList = new CombinerList ().items (combiners );
@@ -395,8 +391,8 @@ public PulseApiImpl(
395391 if (optionalResponse .isPresent ()) {
396392 return optionalResponse .get ();
397393 }
398- final PulseEntity pulseEntity = pulseExtractor .getPulseEntity ();
399- synchronized ( pulseEntity . getLock ()) {
394+ synchronized ( pulseExtractor .getLock ()) {
395+ final PulseEntity pulseEntity = pulseExtractor . getPulseEntity ();
400396 final PulseAgentAssets assets = PulseAgentAssets .fromPersistence (pulseEntity .getPulseAssetsEntity ());
401397 final ManagedAssetList managedAssetList = PulseAgentAssetsConverter .INSTANCE .toRestEntity (assets );
402398 return Response .ok (managedAssetList ).build ();
@@ -422,8 +418,8 @@ public PulseApiImpl(
422418 if (optionalResponse .isPresent ()) {
423419 return optionalResponse .get ();
424420 }
425- final PulseEntity existingPulseEntity = pulseExtractor .getPulseEntity ();
426- synchronized ( existingPulseEntity . getLock ()) {
421+ synchronized ( pulseExtractor .getLock ()) {
422+ final PulseEntity existingPulseEntity = pulseExtractor . getPulseEntity ();
427423 final @ NotNull Optional <DataCombiner > optionalDataCombiner =
428424 assetMappingExtractor .getCombinerById (combiner .getId ());
429425 if (optionalDataCombiner .isEmpty ()) {
@@ -488,8 +484,8 @@ public PulseApiImpl(
488484 if (optionalResponse .isPresent ()) {
489485 return optionalResponse .get ();
490486 }
491- final PulseEntity existingPulseEntity = pulseExtractor .getPulseEntity ();
492- synchronized ( existingPulseEntity . getLock ()) {
487+ synchronized ( pulseExtractor .getLock ()) {
488+ final PulseEntity existingPulseEntity = pulseExtractor . getPulseEntity ();
493489 final PulseAgentAssets assets =
494490 PulseAgentAssets .fromPersistence (existingPulseEntity .getPulseAssetsEntity ());
495491 final OptionalInt optionalAssetIndex = IntStream .range (0 , assets .size ())
0 commit comments