Skip to content

Commit f6822dc

Browse files
committed
removed string duplication
1 parent 51a9c90 commit f6822dc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

logicaldoc-gui/src/main/java/com/logicaldoc/gui/frontend/client/metadata/RetentionPoliciesPanel.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ public void onSuccess(Void result) {
223223

224224
MenuItem enable = new MenuItem();
225225
enable.setTitle(I18N.message("enable"));
226-
enable.setEnabled(!rec.getAttributeAsBoolean(ENABLED));
226+
enable.setEnabled(Boolean.FALSE.equals(rec.getAttributeAsBoolean(ENABLED)));
227227
enable.addClickHandler(event -> RetentionPoliciesService.Instance.get()
228228
.changeStatus(Long.parseLong(rec.getAttributeAsString("id")), true, new DefaultAsyncCallback<>() {
229229
@Override
@@ -235,7 +235,7 @@ public void onSuccess(Void result) {
235235

236236
MenuItem disable = new MenuItem();
237237
disable.setTitle(I18N.message("disable"));
238-
disable.setEnabled(rec.getAttributeAsBoolean(ENABLED));
238+
disable.setEnabled(Boolean.TRUE.equals(rec.getAttributeAsBoolean(ENABLED)));
239239
disable.addClickHandler(event -> RetentionPoliciesService.Instance.get()
240240
.changeStatus(Long.parseLong(rec.getAttributeAsString("id")), false, new DefaultAsyncCallback<>() {
241241
@Override
@@ -283,7 +283,7 @@ public void updateRecord(GUIRetentionPolicy policy) {
283283
rec.setAttribute(TEMPLATE, policy.getTemplateName() != null ? policy.getTemplateName() : null);
284284
rec.setAttribute("position", "" + policy.getPosition());
285285
rec.setAttribute(ACTION, "" + policy.getAction());
286-
rec.setAttribute("eenabled", policy.getEnabled() == 1);
286+
rec.setAttribute(ENABLED, policy.getEnabled() == 1);
287287

288288
list.refreshRow(list.getRecordIndex(rec));
289289
}

0 commit comments

Comments
 (0)