Skip to content

Commit d3dde0d

Browse files
[refactor] Fix NullPointerException test exceptions
1 parent c93e58e commit d3dde0d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

exist-core/src/main/java/org/exist/xquery/XPathException.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ public XPathException(final Expression expr, final String message, final Throwab
208208
*/
209209
@Deprecated
210210
public XPathException(final Expression expr, final Throwable cause) {
211-
this(expr, cause != null && cause instanceof XPathErrorProvider ? ((XPathErrorProvider)cause).getErrorCode() : ErrorCodes.ERROR, cause.getMessage(), null, cause);
211+
this(expr, cause != null && cause instanceof XPathErrorProvider ? ((XPathErrorProvider)cause).getErrorCode() : ErrorCodes.ERROR, cause == null ? "" : cause.getMessage(), null, cause);
212212
}
213213

214214
/**

0 commit comments

Comments
 (0)