Skip to content

Commit

Permalink
StringBuilder
Browse files Browse the repository at this point in the history
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
  • Loading branch information
holgerfriedrich committed Feb 13, 2024
1 parent 6b38623 commit 573ce30
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ private byte[] buildRequestArrayPlain(DatagramChannel channel, String request)
InetSocketAddress sock = (InetSocketAddress) channel.getLocalAddress();

// replace first
StringBuffer req = new StringBuffer(request);
StringBuilder req = new StringBuilder(request);
int p;
while ((p = req.indexOf("$" + PARAMETER_SRC_IP)) != -1) {
req.replace(p, p + PARAMETER_SRC_IP.length() + 1, sock.getAddress().getHostAddress());
Expand Down

0 comments on commit 573ce30

Please sign in to comment.