160160import org .cloudfoundry .util .DelayTimeoutException ;
161161import org .cloudfoundry .util .ExceptionUtils ;
162162import org .cloudfoundry .util .FileUtils ;
163- import org .cloudfoundry .util .FluentMap ;
164163import org .cloudfoundry .util .JobUtils ;
165164import org .cloudfoundry .util .PaginationUtils ;
166165import org .cloudfoundry .util .ResourceMatchingUtils ;
@@ -280,9 +279,7 @@ public Mono<Void> copySource(CopySourceApplicationRequest request) {
280279 @ Override
281280 public Mono <Void > delete (DeleteApplicationRequest request ) {
282281 return getRoutesAndApplicationId (
283- request ,
284- spaceId ,
285- Optional .ofNullable (request .getDeleteRoutes ()).orElse (false ))
282+ request , Optional .ofNullable (request .getDeleteRoutes ()).orElse (false ))
286283 .flatMap (
287284 function (
288285 (routes , applicationId ) ->
@@ -710,14 +707,6 @@ private Mono<Boolean> getSshEnabled(String applicationId) {
710707 .map (GetApplicationSshEnabledResponse ::getEnabled );
711708 }
712709
713- private static Map <String , Object > addToEnvironment (
714- Map <String , Object > environment , String variableName , Object variableValue ) {
715- return FluentMap .<String , Object >builder ()
716- .entries (environment )
717- .entry (variableName , variableValue )
718- .build ();
719- }
720-
721710 private Mono <Void > applyDropletAndWaitForRunning (
722711 String appname , String appId , String dropletId ) {
723712 return this .cloudFoundryClient
@@ -987,7 +976,7 @@ private static String eventDescription(Map<String, Object> request, String... en
987976 sb .append (", " );
988977 }
989978 first = false ;
990- sb .append (entryName ).append (": " ).append (String . valueOf ( value ) );
979+ sb .append (entryName ).append (": " ).append (value );
991980 }
992981 return sb .toString ();
993982 }
@@ -1175,10 +1164,6 @@ private static String[] getEntryNames(String type) {
11751164 return type .contains ("crash" ) ? ENTRY_FIELDS_CRASH : ENTRY_FIELDS_NORMAL ;
11761165 }
11771166
1178- private static Map <String , Object > getEnvironment (AbstractApplicationResource resource ) {
1179- return ResourceUtils .getEntity (resource ).getEnvironmentJsons ();
1180- }
1181-
11821167 private static int getInstances (AbstractApplicationResource resource ) {
11831168 return Optional .ofNullable (resource .getEntity ())
11841169 .map (ApplicationEntity ::getInstances )
@@ -1362,8 +1347,7 @@ private Mono<List<org.cloudfoundry.client.v2.routes.Route>> getRoutes(String app
13621347 }
13631348
13641349 private Mono <Tuple2 <Optional <List <org .cloudfoundry .client .v2 .routes .Route >>, String >>
1365- getRoutesAndApplicationId (
1366- DeleteApplicationRequest request , String spaceId , boolean deleteRoutes ) {
1350+ getRoutesAndApplicationId (DeleteApplicationRequest request , boolean deleteRoutes ) {
13671351 return getApplicationId (request .getName ())
13681352 .flatMap (
13691353 applicationId ->
@@ -1607,13 +1591,6 @@ private Flux<Void> pushDocker(
16071591 applicationId , manifest .getName (), request ));
16081592 }
16091593
1610- private static Map <String , Object > removeFromEnvironment (
1611- Map <String , Object > environment , String variableName ) {
1612- Map <String , Object > modified = new HashMap <>(environment );
1613- modified .remove (variableName );
1614- return modified ;
1615- }
1616-
16171594 private Mono <Void > removeServiceBindings (String applicationId ) {
16181595 return requestListServiceBindings (applicationId )
16191596 .map (ResourceUtils ::getId )
@@ -2191,17 +2168,6 @@ private Mono<UpdateApplicationEnvironmentVariablesResponse> requestUnsetEnvironm
21912168 .build ());
21922169 }
21932170
2194- private Mono <AbstractApplicationResource > requestUpdateApplicationHealthCheckType (
2195- String applicationId , ApplicationHealthCheck type ) {
2196- return requestUpdateApplication (
2197- applicationId , builder -> builder .healthCheckType (type .getValue ()));
2198- }
2199-
2200- private Mono <AbstractApplicationResource > requestUpdateApplicationName (
2201- String applicationId , String name ) {
2202- return requestUpdateApplication (applicationId , builder -> builder .name (name ));
2203- }
2204-
22052171 private Mono <ApplicationFeature > requestUpdateApplicationSsh (
22062172 String applicationId , boolean enabled ) {
22072173 return requestUpdateApplicationFeature (
@@ -2228,11 +2194,6 @@ private Mono<AbstractApplicationResource> requestUpdateApplicationScale(
22282194 builder -> builder .diskQuota (disk ).instances (instances ).memory (memory ));
22292195 }
22302196
2231- private Mono <AbstractApplicationResource > requestUpdateApplicationSsh (
2232- String applicationId , Boolean enabled ) {
2233- return requestUpdateApplication (applicationId , builder -> builder .enableSsh (enabled ));
2234- }
2235-
22362197 private Mono <AbstractApplicationResource > requestUpdateApplicationState (
22372198 String applicationId , String state ) {
22382199 return requestUpdateApplication (applicationId , builder -> builder .state (state ));
0 commit comments