From: David ‘Bombe’ Roden Date: Mon, 30 Jul 2012 09:58:17 +0000 (+0200) Subject: Skip non-existing properties. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=053e8dd106ce4ccc9e961350c0c87b9fcd5610dc;p=demoscenemusic.git Skip non-existing properties. --- diff --git a/src/main/java/net/pterodactylus/demoscenemusic/page/admin/AdminBasePage.java b/src/main/java/net/pterodactylus/demoscenemusic/page/admin/AdminBasePage.java index 2f4d526..66ba7bc 100644 --- a/src/main/java/net/pterodactylus/demoscenemusic/page/admin/AdminBasePage.java +++ b/src/main/java/net/pterodactylus/demoscenemusic/page/admin/AdminBasePage.java @@ -73,7 +73,10 @@ public class AdminBasePage extends BasePage { propertiesToDelete.add(property.getKey()); continue; } - String value = request.getServletRequest().getParameter("value." + property.getKey()).trim(); + String value = request.getServletRequest().getParameter("value." + property.getKey()); + if (value == null) { + continue; + } object.getProperties().set(property.getKey(), value); }