From 9859b970374620e9cdfa33adf29802eba36147ee Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Wed, 26 Mar 2014 23:48:29 +0100 Subject: [PATCH] Consider a null ClassLoader (typically the bootstrap CL) as cache-safe Issue: SPR-11606 (cherry picked from commit a4a2e80) --- .../src/main/java/org/springframework/util/ClassUtils.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-core/src/main/java/org/springframework/util/ClassUtils.java b/spring-core/src/main/java/org/springframework/util/ClassUtils.java index ab565a31da..48a7826337 100644 --- a/spring-core/src/main/java/org/springframework/util/ClassUtils.java +++ b/spring-core/src/main/java/org/springframework/util/ClassUtils.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2013 the original author or authors. + * Copyright 2002-2014 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. @@ -356,7 +356,7 @@ public abstract class ClassUtils { Assert.notNull(clazz, "Class must not be null"); ClassLoader target = clazz.getClassLoader(); if (target == null) { - return false; + return true; } ClassLoader cur = classLoader; if (cur == target) {