提交 65019aca authored 作者: Thomas Mueller's avatar Thomas Mueller

StringUtils.convertBytesToHex

上级 18385135
...@@ -33,8 +33,8 @@ public class JdbcXid extends TraceObject implements Xid { ...@@ -33,8 +33,8 @@ public class JdbcXid extends TraceObject implements Xid {
throw DbException.get(ErrorCode.WRONG_XID_FORMAT_1, tid); throw DbException.get(ErrorCode.WRONG_XID_FORMAT_1, tid);
} }
formatId = Integer.parseInt(tokenizer.nextToken()); formatId = Integer.parseInt(tokenizer.nextToken());
branchQualifier = StringUtils.convertStringToBytes(tokenizer.nextToken()); branchQualifier = StringUtils.convertHexToBytes(tokenizer.nextToken());
globalTransactionId = StringUtils.convertStringToBytes(tokenizer.nextToken()); globalTransactionId = StringUtils.convertHexToBytes(tokenizer.nextToken());
} catch (RuntimeException e) { } catch (RuntimeException e) {
throw DbException.get(ErrorCode.WRONG_XID_FORMAT_1, tid); throw DbException.get(ErrorCode.WRONG_XID_FORMAT_1, tid);
} }
...@@ -48,9 +48,9 @@ public class JdbcXid extends TraceObject implements Xid { ...@@ -48,9 +48,9 @@ public class JdbcXid extends TraceObject implements Xid {
buff.append('_'). buff.append('_').
append(xid.getFormatId()). append(xid.getFormatId()).
append('_'). append('_').
append(StringUtils.convertBytesToString(xid.getBranchQualifier())). append(StringUtils.convertBytesToHex(xid.getBranchQualifier())).
append('_'). append('_').
append(StringUtils.convertBytesToString(xid.getGlobalTransactionId())); append(StringUtils.convertBytesToHex(xid.getGlobalTransactionId()));
return buff.toString(); return buff.toString();
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论