konsoletyper / teavm

Compiles Java bytecode to JavaScript, WebAssembly and C
https://teavm.org
Apache License 2.0
2.66k stars 265 forks source link

Deadlock when doing replace with empty string #932

Closed xpenatan closed 4 months ago

xpenatan commented 4 months ago

There is a bug that replacing empty string with empty text gives deadlock.
I found this because the desktop code have data in otherData while in teavm starts with empty otherData. teavm version 0.10.1.

  String otherData = "";
  String data = "Data";
  String newData = data.replace(otherData, "");