What problem are you trying to solve?
Sample input:
assertEquals(
XAException.XAER_PROTO,
xae.errorCode,
"Prepare call on already prepared xid " + xid + " expects XAER_PROTO"
);
=>
assertEquals(
XAException.XAER_PROTO,
xae.errorCode,
() -> "Prepare call on already prepared xid " + xid + " expects XAER_PROTO" // <-- this is Supplier<String> now
);
Note that compile-time string concatenation should be ignored.
It is fine to keep the message as is since the concatenation is performed at compile time, and there's no runtime overhead.
assertEquals(
XAException.XAER_PROTO,
xae.errorCode,
"Prepare call on already prepared xid " +
" expects XAER_PROTO");
What problem are you trying to solve?
Sample input:
=>
Note that compile-time string concatenation should be ignored.
It is fine to keep the message as is since the concatenation is performed at compile time, and there's no runtime overhead.