Skip to content

Commit

Permalink
Rename method to be more consistent
Browse files Browse the repository at this point in the history
Motivation:

We should rename the method and remove the "Now" suffix to be more consistent with other methods.

Modifications:

Rename method

Result:

Cleanup
  • Loading branch information
normanmaurer committed Dec 7, 2023
1 parent 7502408 commit bb4f0e6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ protected void decryptChunk(ByteBuf chunk, int chunkLength, boolean isFinal, Byt
}

@Override
public void encodePrefixNow(ByteBuf out) {
public void encodePrefix(ByteBuf out) {
sender.writeHeader(out);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ protected abstract void encryptChunk(ByteBuf chunk, int chunkLength, boolean isF
* @param out buffer to write the bytes.
* @throws CryptoException if the prefix cannot be encoded.
*/
protected abstract void encodePrefixNow(ByteBuf out) throws CryptoException;
protected abstract void encodePrefix(ByteBuf out) throws CryptoException;

private final class ContentEncoder implements OHttpChunkFramer.Encoder<HttpObject> {

Expand Down Expand Up @@ -101,7 +101,7 @@ public void encodePrefix(ByteBuf out) throws CryptoException {
if (encodedPrefix) {
throw new IllegalStateException("Prefix already encoded");
}
encodePrefixNow(out);
OHttpRequestResponseContext.this.encodePrefix(out);
encodedPrefix = true;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ protected void decryptChunk(ByteBuf chunk, int chunkSize, boolean isFinal, ByteB


@Override
public void encodePrefixNow(ByteBuf out) throws CryptoException {
public void encodePrefix(ByteBuf out) throws CryptoException {
checkPrefixDecoded();
receiver.writeResponseNonce(out);
}
Expand Down

0 comments on commit bb4f0e6

Please sign in to comment.