Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package org.smartboot.http;


import tech.smartboot.feat.core.common.utils.NumberUtils;
import tech.smartboot.feat.core.common.FeatUtils;
import tech.smartboot.feat.core.server.HttpHandler;
import tech.smartboot.feat.core.server.HttpRequest;
import tech.smartboot.feat.core.server.HttpResponse;
Expand Down Expand Up @@ -31,7 +31,7 @@ public void handle(HttpRequest httpRequest, CompletableFuture<Void> completableF
HttpResponse response = httpRequest.getResponse();
Thread.startVirtualThread(() -> {
try {
int queries = Math.min(Math.max(NumberUtils.toInt(httpRequest.getParameter("queries"), 1), 1), 500);
int queries = Math.min(Math.max(FeatUtils.toInt(httpRequest.getParameter("queries"), 1), 1), 500);
World[] worlds = new World[queries];
try (Connection connection = dataSource.getConnection();
PreparedStatement preparedStatement = connection.prepareStatement("SELECT * FROM World WHERE id=?");) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package org.smartboot.http;


import tech.smartboot.feat.core.common.utils.NumberUtils;
import tech.smartboot.feat.core.common.FeatUtils;
import tech.smartboot.feat.core.server.HttpHandler;
import tech.smartboot.feat.core.server.HttpRequest;
import tech.smartboot.feat.core.server.HttpResponse;
Expand Down Expand Up @@ -29,7 +29,7 @@ public UpdateHandler(DataSource dataSource) {
@Override
public void handle(HttpRequest request) throws IOException {
HttpResponse response = request.getResponse();
int queries = Math.min(Math.max(NumberUtils.toInt(request.getParameter("queries"), 1), 1), 500);
int queries = Math.min(Math.max(FeatUtils.toInt(request.getParameter("queries"), 1), 1), 500);
World[] worlds = new World[queries];
StringJoiner updateSql = new StringJoiner(
", ",
Expand Down
Loading