Skip to content

Instantly share code, notes, and snippets.

@robinhowlett
robinhowlett / JsonPathTest
Created June 4, 2021 17:12
JBang.dev-compatible test for Jayway Json negative filters for empty strings
//DEPS com.jayway.jsonpath:json-path:2.1.0
import com.jayway.jsonpath.JsonPath;
import com.jayway.jsonpath.ReadContext;
import java.util.List;
public class JsonPathTest {
public static void main(String[] args) {
String json = "{\"phoneNumbers\": [\"a\", 1, false, \"\", null, \"hi\", -1]}";
ReadContext ctx = JsonPath.parse(json);

Thread Pools

Thread pools on the JVM should usually be divided into the following three categories:

  1. CPU-bound
  2. Blocking IO
  3. Non-blocking IO polling

Each of these categories has a different optimal configuration and usage pattern.