Skip to content

Commit

Permalink
renamed valuable
Browse files Browse the repository at this point in the history
  • Loading branch information
Xin Zheng committed Jun 5, 2024
1 parent b39e1ac commit 016b8dc
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/main/java/org/swisspush/reststorage/RestStorageHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public class RestStorageHandler implements Handler<HttpServerRequest> {
private final boolean return200onDeleteNonExisting;
private final DecimalFormat decimalFormat;
private final Integer maxStorageExpandSubresources;
private final long resourceCleanupAmount;
private final long configuredCleanupAmount;

public RestStorageHandler(
Vertx vertx,
Expand All @@ -64,7 +64,7 @@ public RestStorageHandler(
this.rejectStorageWriteOnLowMemory = config.isRejectStorageWriteOnLowMemory();
this.return200onDeleteNonExisting = config.isReturn200onDeleteNonExisting();
this.maxStorageExpandSubresources = config.getMaxStorageExpandSubresources();
this.resourceCleanupAmount = config.getResourceCleanupAmount();
this.configuredCleanupAmount = config.getResourceCleanupAmount();

this.decimalFormat = new DecimalFormat();
this.decimalFormat.setMaximumFractionDigits(1);
Expand Down Expand Up @@ -134,11 +134,11 @@ private void cleanup(RoutingContext ctx) {
}

private String getCleanupResourcesAmountContextOrConfig(RoutingContext ctx) {
String cleanupResourcesAmount = ctx.request().getParam("cleanupResourcesAmount");
if (StringUtils.isEmpty(cleanupResourcesAmount)) {
cleanupResourcesAmount = String.valueOf(this.resourceCleanupAmount);
String routingContextCleanupAmount = ctx.request().getParam("cleanupResourcesAmount");
if (StringUtils.isNotEmpty(routingContextCleanupAmount)) {
return routingContextCleanupAmount;
}
return cleanupResourcesAmount;
return String.valueOf(this.configuredCleanupAmount);
}

private void getResourceNotFound(RoutingContext ctx) {
Expand Down

0 comments on commit 016b8dc

Please sign in to comment.