Skip to content

Commit 31924b3

Browse files
committed
codestyle
1 parent 2501904 commit 31924b3

File tree

2 files changed

+12
-17
lines changed

2 files changed

+12
-17
lines changed

cloudplatform/connectivity-destination-service/src/main/java/com/sap/cloud/sdk/cloudplatform/connectivity/DestinationService.java

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141
import lombok.Getter;
4242
import lombok.NoArgsConstructor;
4343
import lombok.RequiredArgsConstructor;
44-
import lombok.Setter;
4544
import lombok.extern.slf4j.Slf4j;
4645

4746
/**
@@ -121,12 +120,7 @@ static ResilienceConfiguration createResilienceConfiguration(
121120
Try<Destination>
122121
tryGetDestination( @Nonnull final String destinationName, @Nonnull final DestinationOptions options )
123122
{
124-
return Cache
125-
.getOrComputeDestination(
126-
this,
127-
destinationName,
128-
options,
129-
this::loadAndParseDestination);
123+
return Cache.getOrComputeDestination(this, destinationName, options, this::loadAndParseDestination);
130124
}
131125

132126
Destination loadAndParseDestination( final String destName, final DestinationOptions options )
@@ -451,12 +445,14 @@ static boolean isChangeDetectionEnabled()
451445
return changeDetectionEnabled;
452446
}
453447

454-
static boolean isGetAllDocumentsPrepended() {
455-
return getAllDocumentsPrepended;
448+
static boolean isGetAllDocumentsPrepended()
449+
{
450+
return getAllDocumentsPrepended;
456451
}
457452

458-
public static void setGetAllDocumentsPrepended(boolean bool) {
459-
getAllDocumentsPrepended = bool;
453+
public static void setGetAllDocumentsPrepended( boolean bool )
454+
{
455+
getAllDocumentsPrepended = bool;
460456
}
461457

462458
@Nonnull
@@ -856,7 +852,7 @@ private static Try<Destination> getOrComputeDestination(
856852
@Nonnull final DestinationService loader,
857853
@Nonnull final String destinationName,
858854
@Nonnull final DestinationOptions options,
859-
@Nonnull final BiFunction<String, DestinationOptions, Destination> destinationDownloader)
855+
@Nonnull final BiFunction<String, DestinationOptions, Destination> destinationDownloader )
860856
{
861857
if( !cacheEnabled ) {
862858
return Try.ofSupplier(() -> destinationDownloader.apply(destinationName, options));

cloudplatform/connectivity-destination-service/src/test/java/com/sap/cloud/sdk/cloudplatform/connectivity/DestinationServiceTest.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1930,8 +1930,7 @@ void testPrependGetAllDestinationsCall()
19301930
.when(destinationServiceAdapter)
19311931
.getConfigurationAsJson(eq("/v1/subaccountDestinations"), any());
19321932

1933-
DestinationService.Cache.setGetAllDocumentsPrepended(true);
1934-
1933+
DestinationService.Cache.setGetAllDocumentsPrepended(true);
19351934

19361935
final DestinationOptions options =
19371936
DestinationOptions.builder().augmentBuilder(augmenter().retrievalStrategy(ALWAYS_PROVIDER)).build();
@@ -1944,7 +1943,7 @@ void testPrependGetAllDestinationsCall()
19441943
.getConfigurationAsJson(eq("/v1/destinations/" + destinationName), any());
19451944
verifyNoMoreInteractions(destinationServiceAdapter);
19461945

1947-
DestinationService.Cache.setGetAllDocumentsPrepended(false);
1946+
DestinationService.Cache.setGetAllDocumentsPrepended(false);
19481947
}
19491948

19501949
@Test
@@ -1957,7 +1956,7 @@ void testPrependGetAllDestinationsCallWithMissingDestination()
19571956
.when(destinationServiceAdapter)
19581957
.getConfigurationAsJson(eq("/v1/subaccountDestinations"), any());
19591958

1960-
DestinationService.Cache.setGetAllDocumentsPrepended(true);
1959+
DestinationService.Cache.setGetAllDocumentsPrepended(true);
19611960

19621961
final DestinationOptions options =
19631962
DestinationOptions.builder().augmentBuilder(augmenter().retrievalStrategy(ALWAYS_PROVIDER)).build();
@@ -1970,6 +1969,6 @@ void testPrependGetAllDestinationsCallWithMissingDestination()
19701969
verify(destinationServiceAdapter, times(1)).getConfigurationAsJson(eq("/v1/subaccountDestinations"), any());
19711970
verifyNoMoreInteractions(destinationServiceAdapter);
19721971

1973-
DestinationService.Cache.setGetAllDocumentsPrepended(false);
1972+
DestinationService.Cache.setGetAllDocumentsPrepended(false);
19741973
}
19751974
}

0 commit comments

Comments
 (0)