So, some thing I've bothered myself with. We have a common idiom where we do something like: var result = doSometThing(); if(result == null) { return handleEmptyCase(); } // continue logic with result With Optional, that has changed, somewhat... var result = doSometThing(); if(result.isEmpty()) { return handleEmptyCase(); } var actualResult = result.get(); // continue logic with actualResult But this is... messy. We could go functional on it: return doSomeThing() .map(result -> doWithActualResult(result)) .orElse( () -> return handleEmptyCase();) But this isn't it either. We now have the else clause handling our special exit, which is not what we prefer, we prefer to exit early. So, sometimes an optional is... not as nice... Something interesting is: https://stackoverflow.com/questions/73248935/using-optionals-is-it-possible-to-return-early-on-ifpresent-without-adding-a ...
So, more stuff I always forget... how to properly generate SSL certs. Well, easiest is with openssl (of course) Something like: openssl req -new -newkey rsa:2048 -nodes -sha256 -subj "/C=NL/ST=Utrecht/L=Utrecht/O=Cooperatieve Rabobank U.A./OU=RASS Groep ICT/CN=my-common-name.host.nl" -keyout somename-prod.key -out somename-prod.csr That can get you a certificate sign request (csr) and the appropriate key. Of course, you want to then import those keys into a keystore. The trick to doing that is to convert it to a pkcs12 format where it can have the certificate and the key combined. openssl pkcs12 -export -inkey somename-prod.key -in somename-prod.rabobank.nl.crt -out somename-prod.p12 Note that the crt is the signed certificate, acquired through getting the csr generated above approved.. This p12 file you can import using something like KeyStore Explorer. After that, you can also append the root certificates of the original cert, to en...