From 9865bd176bde875b1f1eaf4d4319c5c3b298ff69 Mon Sep 17 00:00:00 2001 From: ulrich Date: Sat, 10 Apr 2021 18:14:44 +0000 Subject: [PATCH] Fehler bei Abspielliste-Formular bei Cancel behoben --- src/de/uhilger/mediaz/api/StorageHandler.java | 11 +++++------ 1 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/de/uhilger/mediaz/api/StorageHandler.java b/src/de/uhilger/mediaz/api/StorageHandler.java index e6521bc..d12e6c1 100644 --- a/src/de/uhilger/mediaz/api/StorageHandler.java +++ b/src/de/uhilger/mediaz/api/StorageHandler.java @@ -22,7 +22,6 @@ import de.uhilger.mediaz.App; import static de.uhilger.mediaz.App.RB_EP_LISTE; import de.uhilger.mediaz.Server; -import static de.uhilger.mediaz.Server.RB_SLASH; import de.uhilger.mediaz.store.FileStorage; import de.uhilger.mediaz.entity.Entity; import java.io.IOException; @@ -43,7 +42,7 @@ @Override protected String put(HttpExchange e) throws IOException { String path = e.getRequestURI().toString(); - String[] elems = path.split(App.getRs(Server.RB_SLASH)); + String[] elems = path.split(Server.SLASH); String type = elems[elems.length - 2]; String elemName = elems[elems.length - 1]; // alter Name, wenn Aenderung if(!elemName.equalsIgnoreCase(App.getRs(RB_EP_LISTE))) { @@ -59,7 +58,7 @@ } else { fs.write(entity, false); } - return type + App.getRs(Server.RB_SLASH) + entity.getName(); + return type + Server.SLASH + entity.getName(); } else { return "Ungueltiges Objekt im Body."; } @@ -70,7 +69,7 @@ private boolean loeschen(HttpExchange e) { String path = e.getRequestURI().toString(); - String[] elems = path.split(App.getRs(Server.RB_SLASH)); + String[] elems = path.split(Server.SLASH); String type = elems[elems.length - 2]; String elemName = elems[elems.length - 1]; FileStorage fs = new FileStorage(App.getInitParameter(App.getRs(App.RB_AP_CONF))); @@ -79,9 +78,9 @@ private String lesen(HttpExchange e) { String path = e.getRequestURI().toString(); - String[] elems = path.split(App.getRs(Server.RB_SLASH)); + String[] elems = path.split(Server.SLASH); FileStorage fs = new FileStorage(App.getInitParameter(App.getRs(App.RB_AP_CONF))); - if(path.endsWith(App.getRs(RB_SLASH))) { + if(path.endsWith(Server.SLASH)) { List list = null; if(elems[elems.length - 1].equalsIgnoreCase(App.getRs(RB_EP_LISTE))) { String type = elems[elems.length - 2]; -- Gitblit v1.9.3