--- title: jdk.net.url.delayParsing Java System Property prop: jdk.net.url.delayParsing description: The jdk.net.url.delayParsing java system property can delay parsing of java.net.URL until after connection is opened. layout: layout date: Last Modified nav: system tags: networking since: Java 20 example_value: false ---

Java System Property

Default Value

false - by default the property is not set and will not delay parsing until after the connection is opened

Overview of

In versions prior to Java 20, the java.net.URL constructor would not fully parse the URL until after the openConnection or connect method was called. In Java 20 and above the default is to perform the parsing first which may throw a MalformedURLException upon an invalid URL value.

This system property was added to address backwards compatibility by setting it to true, however this may lead to a less secure environment. The idea is that a threat actor could pass a URL which is invalid but may still open a connection to a host of their choosing.

Other Networking System Properties

Here are some other networking Java system properties: