Fix putTopic hook firing

The oldTopicName and newTopicName variables were only being set in a
local scope. Fix so that the instance variables (that the hook uses) are
set instead.

Change-Id: I0fcf4b07861f4e0c7df2df88784fe2f1f611a5ff
This commit is contained in:
Nasser Grainawi
2015-11-11 09:55:04 -08:00
parent e6b3015bcc
commit 5e2585f6a1

View File

@@ -101,8 +101,8 @@ public class PutTopic implements RestModifyView<ChangeResource, Input>,
@Override
public void updateChange(ChangeContext ctx) throws OrmException {
change = ctx.getChange();
String newTopicName = Strings.nullToEmpty(input.topic);
String oldTopicName = Strings.nullToEmpty(change.getTopic());
newTopicName = Strings.nullToEmpty(input.topic);
oldTopicName = Strings.nullToEmpty(change.getTopic());
if (oldTopicName.equals(newTopicName)) {
return;
}