A colleague showed me the following piece of non-working code:
Handler h = new Handler();
if (h == null) {
throw new RuntimeException("initialization failed");
}Apparently, the previous version used a factory to produce the Handler!