From 8c4233fa116be192cc016e87823fc574d91581cc Mon Sep 17 00:00:00 2001 From: Stuart McCulloch Date: Sun, 19 Mar 2023 20:46:44 +0000 Subject: [PATCH] Include JDK system classes in muzzle build-time checks, so types like java.net.http.HttpRequest are visible when checking against Java11 --- buildSrc/src/main/groovy/MuzzlePlugin.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildSrc/src/main/groovy/MuzzlePlugin.groovy b/buildSrc/src/main/groovy/MuzzlePlugin.groovy index 5b31c67be3f..d52791acb1b 100644 --- a/buildSrc/src/main/groovy/MuzzlePlugin.groovy +++ b/buildSrc/src/main/groovy/MuzzlePlugin.groovy @@ -639,7 +639,7 @@ abstract class MuzzleAction implements WorkAction { assertionMethod.invoke(null, instCL, testCL, assertPass, muzzleDirective) } - static ClassLoader createClassLoader(cp, parent = null) { + static ClassLoader createClassLoader(cp, parent = ClassLoader.systemClassLoader) { return new URLClassLoader(cp*.toURI()*.toURL() as URL[], parent as ClassLoader) } }