Skip to content

Commit 325b4b8

Browse files
committed
chore(spanner): address review comments
1 parent 662821d commit 325b4b8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

java-spanner/google-cloud-spanner/src/main/java/com/google/cloud/spanner/XGoogSpannerRequestId.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ private static String generateRandProcessId() {
126126

127127
/** Returns the string representation of this RequestId as it should be sent to Spanner. */
128128
public String getHeaderValue() {
129-
return new StringBuilder(64)
129+
return new StringBuilder(this.instancePrefix.length() + 48)
130130
.append(this.instancePrefix)
131131
.append(this.nthChannelId)
132132
.append('.')
@@ -138,7 +138,7 @@ public String getHeaderValue() {
138138

139139
@Override
140140
public String toString() {
141-
StringBuilder sb = new StringBuilder(64);
141+
StringBuilder sb = new StringBuilder(this.instancePrefix.length() + 48);
142142
sb.append(this.instancePrefix);
143143
if (this.nthChannelId < 0) {
144144
sb.append('x');

0 commit comments

Comments
 (0)