Skip to content
This repository was archived by the owner on Nov 15, 2022. It is now read-only.

Commit 5c41041

Browse files
h2002044yaminikb
authored andcommitted
Issue 21536: Avoid NPE in SQLTraceRecord (#21980)
1 parent f3e9eae commit 5c41041

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

nucleus/common/glassfish-api/src/main/java/org/glassfish/api/jdbc/SQLTraceRecord.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,9 @@ public String toString() {
228228
if(params != null && params.length > 0) {
229229
int index = 0;
230230
for(Object param : params) {
231-
sb.append("arg[" + index++ + "]=" + param.toString() + " | ");
231+
sb.append("arg[" + index++ + "]=" +
232+
(param != null ? param.toString() : "null" ) +
233+
" | ");
232234
}
233235
}
234236
//TODO add poolNames and other fields of this record.

0 commit comments

Comments
 (0)