Is it normal that a ConnectionException does not have a message-text??
Is null generally allowed for the message?
Using OpenJDK17 and OpenJDK11.
try
{
HttpRequest httpreq = HttpRequest.newBuilder ().uri (URI.create ("http://blabla.blabla.blabla")).build ();
HttpClient httpclnt = HttpClient.newBuilder ().build ();
HttpResponse <String> httpresp = httpclnt.send (httpreq, HttpResponse.BodyHandlers.ofString ());
}
catch (Exception e)
{
System.out.println ("EXCEPTION: " + e + " - " + e.getMessage ());
}
Output is
EXCEPTION: java.net.ConnectException - null