-
Improvement
-
Resolution: Unresolved
-
Neutral
-
None
-
None
-
None
-
None
The catch block for getNodeIdentifierIfPossible(Node content) and getNodePathIfPossible(Node node) both return “<not available>” . To keep things consistent, it is preferred to have these two catch blocks be similar to that of the getPathIfPossible(Node node) method, where it returns the empty string or null instead of “<not available>".
See below for the code:
public static String getNodeIdentifierIfPossible(Node content) { try { return content.getIdentifier(); } catch (RepositoryException e) { return "<not available>"; } } public static String getNodePathIfPossible(Node node) { try { return node.getPath(); } catch (RepositoryException e) { return "<not available>"; } } public static String getPathIfPossible(Node node) { try { return node.getPath(); } catch (RepositoryException e) { log.error("Failed to get handle: {}", e.getMessage(), e); return ""; } }
Acceptance criteria
- is related to
-
MAGNOLIA-4441 Review util classes
- Open