Skip to content

Commit 9149e7a

Browse files
committed
Cleanup
1 parent 6c13710 commit 9149e7a

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

server/src/main/java/org/elasticsearch/common/io/stream/RecyclerBytesStreamOutput.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -138,10 +138,6 @@ public void writeUTF8String(String str) throws IOException {
138138
}
139139
}
140140

141-
/**
142-
* Fast path for writing ASCII characters. Returns true if all characters
143-
* were ASCII, false if a non-ASCII character was encountered.
144-
*/
145141
private boolean writeAsciiChars(String str, int charCount) {
146142
int charIndex = 0;
147143

@@ -157,7 +153,6 @@ private boolean writeAsciiChars(String str, int charCount) {
157153
bytesRefBytes[bytesRefOffset + currentPageOffset + i] = (byte) c;
158154
}
159155

160-
// Update positions for what we wrote
161156
currentPageOffset += charsToWrite;
162157
charIndex += charsToWrite;
163158

@@ -166,7 +161,7 @@ private boolean writeAsciiChars(String str, int charCount) {
166161
}
167162
}
168163

169-
return true; // All characters were ASCII
164+
return true;
170165
}
171166

172167
private void handleNonAsciiString(String str) throws IOException {

0 commit comments

Comments
 (0)