Fix SSL refrence construction in Java