XID.toString broken: indexing mistake in array
----------------------------------------------
Key: JBTM-2284
URL:
https://issues.jboss.org/browse/JBTM-2284
Project: JBoss Transaction Manager
Issue Type: Bug
Affects Versions: 4.17.15
Environment: EAP 6.2.4 with JBoss JTS module in version 4.17.15
Reporter: Christian von Kutzleben
Assignee: Tom Jenkinson
Fix For: 4.17.24
com.arjuna.ats.internal.jta.xa.XID
public String toString ()
{
//...
stringBuilder.append(", ");
for (int i = 0; i < bqual_length; i++) {
stringBuilder.append(gtrid_length+data[i]);
}
//...
}
correct: stringBuilder.append(data[i+gtrid_length]);
The result is, that the Xid instances logged in log files are corrupted and multiple
different Xid share the same String representation, which makes the logging information
unusable