Skip to content
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

[fix/MNT-24172-fixRecreationOfRendition2] Fix of recreation of rendition2 #3155

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mohit-singh4
Copy link
Contributor

Based on the implemented code, below are the observations encountered during the execution of the RenditionService2 implementation via the POST- nodes/{nodeId}/renditions and DELETE- nodes/{nodeId}/renditions/{renditionId} endpoints:

  • The POST endpoint assigns the rn:rendition2 aspect to the respective rendition nodes (e.g., cm:pdf).
  • After executing the DELETE endpoint, the CONTENT_PROPERTY is removed from the rendition nodes.
  • When attempting to open the document from Share, a condition for Qname-cm:pdf checks for ASPECT_RENDITION2, during which the CONTENT_PROPERTY is retrieved. However, it returns null, causing the document not to open and resulting in a NullPointerException. Since the CONTENT_PROPERTY is removed during the DELETE operation, the renditions for ASPECT2 are returning null content, which leads to NullPointerExceptions.

[Solution]: Instead of throwing a NullPointerException, we are logging the error. Additionally, we are removing the existing rendition node (since the content data is null) and assigning a newly created rendition node.

Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PMD found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

Copy link
Contributor

@SathishK-T SathishK-T left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@purusothaman-mm purusothaman-mm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants