From 85d4647bda19455287f9b4ad5750edcba7e7e2fb Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Thu, 25 Jan 2018 15:55:07 +0000 Subject: [PATCH] Downgrade to Groovy 2.4.13 There's an extra ClassLoader in the hierarchy of the TCCL in Groovy 2.4 vs Groovy 2.5 so we require an extra getParent() call to avoid being able to load classes that are visible to the launched URL class loader. Closes gh-11745 --- .../boot/cli/compiler/ExtendedGroovyClassLoader.java | 4 ++-- spring-boot-project/spring-boot-dependencies/pom.xml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/ExtendedGroovyClassLoader.java b/spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/ExtendedGroovyClassLoader.java index b7a00724f6..8693ed7bdf 100644 --- a/spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/ExtendedGroovyClassLoader.java +++ b/spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/ExtendedGroovyClassLoader.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2017 the original author or authors. + * Copyright 2012-2018 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. @@ -176,7 +176,7 @@ public class ExtendedGroovyClassLoader extends GroovyClassLoader { DefaultScopeParentClassLoader(ClassLoader parent) { super(parent); this.groovyOnlyClassLoader = new URLClassLoader(getGroovyJars(parent), - parent.getParent()); + parent.getParent().getParent()); } private URL[] getGroovyJars(ClassLoader parent) { diff --git a/spring-boot-project/spring-boot-dependencies/pom.xml b/spring-boot-project/spring-boot-dependencies/pom.xml index 0ecf15e49b..5ee34297ed 100644 --- a/spring-boot-project/spring-boot-dependencies/pom.xml +++ b/spring-boot-project/spring-boot-dependencies/pom.xml @@ -53,7 +53,7 @@ 2.3.27-incubating 5.6.6 3.0.0 - 2.5.0-beta-2 + 2.4.13 2.8.2 1.4.196 1.3