Skip to content

Commit c492b6f

Browse files
committed
Fix PMD
1 parent 6cab0ac commit c492b6f

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

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

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -135,25 +135,25 @@ static ResilienceConfiguration createResilienceConfiguration(
135135

136136
Option<Exception> validateDestinationLookup( final String destinationName, final DestinationOptions options )
137137
{
138-
final Option<Exception> VALID_LOOKUP = Option.none();
138+
final Option<Exception> validLookup = Option.none();
139139
if( !Cache.isEnabled() ) {
140-
return VALID_LOOKUP;
140+
return validLookup;
141141
}
142142
if( !Cache.preLookupCheckEnabled ) {
143-
return VALID_LOOKUP;
143+
return validLookup;
144144
}
145145
if( Cache.isUsingExperimentalFeatures(options) ) {
146146
final String msg =
147147
"Using pre-lookup check together with either fragments, cross-level options, or custom headers might lead to unexpected behaviour. Pre-lookup check is skipped.";
148148
log.warn(msg);
149-
return VALID_LOOKUP;
149+
return validLookup;
150150
}
151151

152152
final DestinationServiceRetrievalStrategy strategy = getRetrievalStrategy(options).getOrElse(CURRENT_TENANT);
153153
final Collection<DestinationProperties> cachedDestinations = getAllDestinationProperties(strategy);
154154
final Predicate<DestinationProperties> pred = p -> p.get(DestinationProperty.NAME).contains(destinationName);
155155
if( cachedDestinations.stream().anyMatch(pred) ) {
156-
return VALID_LOOKUP;
156+
return validLookup;
157157
}
158158

159159
final String msgFormat = "Destination %s was not found among the destinations for %s.";

0 commit comments

Comments
 (0)