From 75bc620631c800d81ee01b0d3a179389add6c4f5 Mon Sep 17 00:00:00 2001 From: Mohamed Amine Krout Date: Fri, 22 Mar 2024 16:58:46 +0100 Subject: [PATCH] fix: Log errors related to Documents - EXO-70478 (#321) --- .../services/jcr/ext/action/ModifyNodeAction.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/action/ModifyNodeAction.java b/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/action/ModifyNodeAction.java index 945d64e15..21b4dbb9e 100644 --- a/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/action/ModifyNodeAction.java +++ b/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/action/ModifyNodeAction.java @@ -51,9 +51,11 @@ public boolean execute(Context context) throws Exception { if(node.canAddMixin("exo:modify")) { node.addMixin("exo:modify"); } - String propertyName =((PropertyImpl) item).getInternalName().getName(); - if (propertyName.equals("documentViews") || propertyName.equals("documentViewers")) { - return false; + if (item instanceof Property) { + String propertyName = ((PropertyImpl) item).getInternalName().getName(); + if (propertyName.equals("documentViews") || propertyName.equals("documentViewers")) { + return false; + } } node.setProperty("exo:lastModifiedDate", new GregorianCalendar()); node.setProperty("exo:lastModifier",userName);