mirror of
https://github.com/itplr-kosit/validator.git
synced 2026-05-25 16:55:39 +00:00
#11 jdk11 support
This commit is contained in:
parent
248f460500
commit
70149817bf
17 changed files with 391 additions and 149 deletions
|
|
@ -68,6 +68,7 @@ class Daemon {
|
|||
@Override
|
||||
public void handle(HttpExchange httpExchange) throws IOException {
|
||||
try {
|
||||
log.debug("Incoming request");
|
||||
String requestMethod = httpExchange.getRequestMethod();
|
||||
if (requestMethod.equals("POST")) {
|
||||
InputStream inputStream = httpExchange.getRequestBody();
|
||||
|
|
@ -82,7 +83,7 @@ class Daemon {
|
|||
} else {
|
||||
writeError(httpExchange, 405, "Es ist nur die POST-Methode erlaubt!");
|
||||
}
|
||||
} catch (TransformerException e) {
|
||||
} catch (Exception e) {
|
||||
writeError(httpExchange, 500, "Interner Fehler bei der Verarbeitung des Requests: " + e.getMessage());
|
||||
log.error("Es ist ein Fehler aufgetreten. Das Dokument kann nicht geprüft werden", e);
|
||||
}
|
||||
|
|
@ -189,7 +190,7 @@ class Daemon {
|
|||
server.createContext("/health", new HealthHandler(check.getRepository().getScenarios()));
|
||||
server.setExecutor(Executors.newFixedThreadPool(threadCount));
|
||||
server.start();
|
||||
log.info("Server ist erfolgreich gestartet");
|
||||
log.info("Server unter Port {} ist erfolgreich gestartet", port);
|
||||
} catch (IOException e) {
|
||||
log.error("Fehler beim HttpServer erstellen!", e.getMessage(), e);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue