[JDP-9] Try with resources
Better nested type syntax