fixed build error

This commit is contained in:
Jan-Peter Klein
2023-09-12 18:07:30 +02:00
parent 5d7906972b
commit 4c83617847

View File

@@ -6,7 +6,6 @@ import org.cryptomator.common.Environment;
import org.cryptomator.common.ErrorCode;
import org.cryptomator.common.Nullable;
import org.cryptomator.ui.common.FxController;
import org.cryptomator.ui.fxapp.UpdateChecker;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -69,7 +68,6 @@ public class ErrorController implements FxController {
private final Stage window;
private final Environment environment;
private final ExecutorService executorService;
private final UpdateChecker updateChecker;
private final BooleanProperty copiedDetails = new SimpleBooleanProperty();
private final ObjectProperty<ErrorDiscussion> matchingErrorDiscussion = new SimpleObjectProperty<>();
@@ -78,7 +76,7 @@ public class ErrorController implements FxController {
private final BooleanProperty askedForLookupDatabasePermission = new SimpleBooleanProperty();
@Inject
ErrorController(Application application, @Named("stackTrace") String stackTrace, ErrorCode errorCode, @Nullable Scene previousScene, Stage window, Environment environment, ExecutorService executorService, UpdateChecker updateChecker) {
ErrorController(Application application, @Named("stackTrace") String stackTrace, ErrorCode errorCode, @Nullable Scene previousScene, Stage window, Environment environment, ExecutorService executorService) {
this.application = application;
this.stackTrace = stackTrace;
this.errorCode = errorCode;
@@ -86,7 +84,6 @@ public class ErrorController implements FxController {
this.window = window;
this.environment = environment;
this.executorService = executorService;
this.updateChecker = updateChecker;
}
@FXML
@@ -150,7 +147,7 @@ public class ErrorController implements FxController {
askedForLookupDatabasePermission.set(true);
HttpClient httpClient = HttpClient.newBuilder().version(HttpClient.Version.HTTP_1_1).build();
HttpRequest httpRequest = HttpRequest.newBuilder()//
.header("User-Agent", USER_AGENT_VERSION_FORMAT.formatted(updateChecker.getCurrentVersion()))
.header("User-Agent", USER_AGENT_VERSION_FORMAT.formatted(environment.getAppVersion()))
.uri(URI.create(ERROR_CODES_URL_FORMAT.formatted(URLEncoder.encode(errorCode.toString(),StandardCharsets.UTF_8))))//
.build();
httpClient.sendAsync(httpRequest, HttpResponse.BodyHandlers.ofInputStream())//