Fix message when trying to set a non-editable plugin config value

Trying to set a non-editable plugin config value fails with
"Not allowed to set parameter '<parameter-name>' of plugin
'<plugin-name>' on project '<project-name>'.", but '<parameter-name>'
was replaced with the plugin name.

Change-Id: I6ea8d0263c3d646eb47b97210e270226c7413c1a
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
This commit is contained in:
Edwin Kempin
2015-06-18 14:54:47 +02:00
parent eb20b38a52
commit e1892230d6

View File

@@ -239,7 +239,7 @@ public class PutConfig implements RestModifyView<ProjectResource, Input> {
if (Strings.emptyToNull(value) != null) {
if (!value.equals(oldValue)) {
validateProjectConfigEntryIsEditable(projectConfigEntry,
projectState, e.getKey(), pluginName);
projectState, v.getKey(), pluginName);
v.setValue(projectConfigEntry.preUpdate(v.getValue()));
value = v.getValue().value;
try {
@@ -283,7 +283,7 @@ public class PutConfig implements RestModifyView<ProjectResource, Input> {
} else {
if (oldValue != null) {
validateProjectConfigEntryIsEditable(projectConfigEntry,
projectState, e.getKey(), pluginName);
projectState, v.getKey(), pluginName);
cfg.unset(v.getKey());
}
}