Skip to content

Instantly share code, notes, and snippets.

@cboddy
Created August 15, 2019 18:09
Show Gist options
  • Save cboddy/f2bd930fa24187a041da25b2080af7ca to your computer and use it in GitHub Desktop.
Save cboddy/f2bd930fa24187a041da25b2080af7ca to your computer and use it in GitHub Desktop.
Javac Snafu
import java.util.HashMap;
import java.util.Map;
import java.util.stream.Collectors;
public class WTF_JAVAC {
private static final Map<String, String> MAP = new HashMap<>();
private static final String HELP = "\n"+ MAP.entrySet().stream()
.sorted()
.map(e -> {
String s = e.getKey() + "\t:\t" + e.getValue();
return s;
})
.collect(Collectors.joining("\n"));
}
// what is going on javac?
//Information:15/08/19 18:59 - Compilation completed with 1 error and 0 warnings in 4 s 30 ms
//Error:java: java.lang.StackOverflowError
//
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment