Fix unsetting of int/long plugin project parameters

An empty string value should unset the parameter. Currently it fails
with a NumberFormatException.

Change-Id: I31de7d79006bf245432d4ced31779187e241251c
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
This commit is contained in:
Edwin Kempin
2014-02-01 23:17:03 +01:00
parent a8a303c809
commit f484d7eb91

View File

@@ -195,7 +195,7 @@ public class PutConfig implements RestModifyView<ProjectResource, Input> {
continue;
}
String oldValue = cfg.getString(v.getKey());
if (v.getValue() != null) {
if (Strings.emptyToNull(v.getValue()) != null) {
if (!v.getValue().equals(oldValue)) {
validateProjectConfigEntryIsEditable(projectConfigEntry,
projectState, e.getKey(), pluginName);