-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added LoggingAwareExecuter interface to AnnotationBasedActionExecuter… #284
Added LoggingAwareExecuter interface to AnnotationBasedActionExecuter… #284
Conversation
Specifically detected this issue when a mandatory action parameter was not filled in. (triggering the Very easy to reproduce, just set a mandatory parameter and call the action without setting it. When debugging the ActionServiceImpl I could see the real exception was:
but instead the logging said:
|
Thanks for your PR, @tom-vandepoele ! Related issue: #278 The problem is that the |
Can we polyfill that |
If you were to include the interface source in the annotation runtime package, I think this resolves the problem. Alfresco 5 would not have any runtime problems as the interface exists and later versions would work too. |
3fc3bcb
to
16519ec
Compare
To make sure this doesn't get lost I rebased on the latest master.
If we include the I think we have two options:
|
… so exceptions in alfresco actions get handled the same as in ActionExecuterAbstractBase and not throw a java.lang.ClassCastException
16519ec
to
df0696f
Compare
Decision concerning this issue:
I rebased the branch once again on master & include the polyfill for Alfresco 5.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, but the sonar check fails ?
Sonar fails because: I suppose this is because it's build from the |
Thanks for the contribution @tom-vandepoele ! |
… so exceptions in alfresco actions get handled the same as in ActionExecuterAbstractBase and not throw a java.lang.ClassCastException
Motivation and Context
When Alfresco's ActionServiceImpl method onLogException is called it tries to use the LoggingAwareExecuter interface, however it is not implemented so a java.lang.ClassCastException is thrown instead.
By simply adding the interface to the AnnotationBasedActionExecuter with the same implementation as in ActionExecuterAbstractBase this problem is resolved and error logging is handled as normal in OOTB alfresco action.
Types of changes
Checklist: