Ensure PROTOCOL_HANDLER system property is reset

See gh-31870
This commit is contained in:
aoyvx
2022-07-26 22:31:25 +08:00
committed by Phillip Webb
parent 9329acdad8
commit 8c93d2e8a7

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2020 the original author or authors.
* Copyright 2012-2022 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -413,7 +413,7 @@ public class Handler extends URLStreamHandler {
*/
static void captureJarContextUrl() {
if (canResetCachedUrlHandlers()) {
String handlers = System.getProperty(PROTOCOL_HANDLER, "");
String handlers = System.getProperty(PROTOCOL_HANDLER);
try {
System.clearProperty(PROTOCOL_HANDLER);
try {