]> source.dussan.org Git - jgit.git/commit
PacketLineIn: ensure that END != DELIM 01/172601/1
authorThomas Wolf <thomas.wolf@paranor.ch>
Thu, 19 Nov 2020 12:23:05 +0000 (13:23 +0100)
committerMatthias Sohn <matthias.sohn@sap.com>
Fri, 20 Nov 2020 22:30:24 +0000 (23:30 +0100)
commit9f3616dcb43246b883f9943af0de7cf67836c443
treeca506b682634af6466dd213781101c9588db2fa0
parentb5ba23755906b1caa48031db7ec8dfcd68971fdb
PacketLineIn: ensure that END != DELIM

Just allocate the two string objects directly. The previously used
new StringBuilder(0).toString() returns the same object for both END
and DELIM when run on Java 15, which breaks the wire protocol since
then END and DELIM cannot be distinguished anymore.

Bug: 568950
Change-Id: I9d54d7bf484948c24b51a094256bd9d38b085f35
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
(cherry picked from commit 7da0f0a8f37e35e9c3108588f1e6f7a7381d8f77)
org.eclipse.jgit/src/org/eclipse/jgit/transport/PacketLineIn.java