From cdadb834b0a7b9c609334dbfd22b4fb43549306b Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Tue, 28 Apr 2020 13:02:39 +0200 Subject: [PATCH] Redefine DefaultResourceLoader default constructor for late TCCL access Closes gh-24957 --- .../org/springframework/core/io/DefaultResourceLoader.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spring-core/src/main/java/org/springframework/core/io/DefaultResourceLoader.java b/spring-core/src/main/java/org/springframework/core/io/DefaultResourceLoader.java index 936c1d3e50f..09fbbfd25b8 100644 --- a/spring-core/src/main/java/org/springframework/core/io/DefaultResourceLoader.java +++ b/spring-core/src/main/java/org/springframework/core/io/DefaultResourceLoader.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2019 the original author or authors. + * Copyright 2002-2020 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. @@ -58,11 +58,11 @@ public class DefaultResourceLoader implements ResourceLoader { /** * Create a new DefaultResourceLoader. *

ClassLoader access will happen using the thread context class loader - * at the time of this ResourceLoader's initialization. + * at the time of actual resource access (since 5.3). For more control, pass + * a specific ClassLoader to {@link #DefaultResourceLoader(ClassLoader)}. * @see java.lang.Thread#getContextClassLoader() */ public DefaultResourceLoader() { - this.classLoader = ClassUtils.getDefaultClassLoader(); } /**