From ab8b2496218f49f49d2602987481e2dd7a3e7293 Mon Sep 17 00:00:00 2001
From: ulrich <undisclosed@undiclosed>
Date: Sat, 10 Apr 2021 17:59:27 +0000
Subject: [PATCH] UI-Anpassungen

---
 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