Skip to content

Commit 9859b97

Browse files
committed
Consider a null ClassLoader (typically the bootstrap CL) as cache-safe
Issue: SPR-11606 (cherry picked from commit a4a2e80)
1 parent 32852e0 commit 9859b97

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

spring-core/src/main/java/org/springframework/util/ClassUtils.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2013 the original author or authors.
2+
* Copyright 2002-2014 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -356,7 +356,7 @@ public static boolean isCacheSafe(Class<?> clazz, ClassLoader classLoader) {
356356
Assert.notNull(clazz, "Class must not be null");
357357
ClassLoader target = clazz.getClassLoader();
358358
if (target == null) {
359-
return false;
359+
return true;
360360
}
361361
ClassLoader cur = classLoader;
362362
if (cur == target) {

0 commit comments

Comments
 (0)