Skip to content

Commit a4a2e80

Browse files
committed
Consider a null ClassLoader (typically the bootstrap CL) as cache-safe
Issue: SPR-11606
1 parent e8c06c6 commit a4a2e80

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

+2-2
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.
@@ -388,7 +388,7 @@ public static boolean isCacheSafe(Class<?> clazz, ClassLoader classLoader) {
388388
Assert.notNull(clazz, "Class must not be null");
389389
ClassLoader target = clazz.getClassLoader();
390390
if (target == null) {
391-
return false;
391+
return true;
392392
}
393393
ClassLoader cur = classLoader;
394394
if (cur == target) {

0 commit comments

Comments
 (0)