Commit 73ad36d8 authored by Andy Wilkinson's avatar Andy Wilkinson

Merge branch '1.5.x'

parents 782ab280 14685850
/* /*
* 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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
...@@ -138,6 +138,7 @@ public class RestartClassLoader extends URLClassLoader implements SmartClassLoad ...@@ -138,6 +138,7 @@ public class RestartClassLoader extends URLClassLoader implements SmartClassLoad
if (file != null && file.getKind() == Kind.DELETED) { if (file != null && file.getKind() == Kind.DELETED) {
throw new ClassNotFoundException(name); throw new ClassNotFoundException(name);
} }
synchronized (getClassLoadingLock(name)) {
Class<?> loadedClass = findLoadedClass(name); Class<?> loadedClass = findLoadedClass(name);
if (loadedClass == null) { if (loadedClass == null) {
try { try {
...@@ -152,6 +153,7 @@ public class RestartClassLoader extends URLClassLoader implements SmartClassLoad ...@@ -152,6 +153,7 @@ public class RestartClassLoader extends URLClassLoader implements SmartClassLoad
} }
return loadedClass; return loadedClass;
} }
}
@Override @Override
protected Class<?> findClass(String name) throws ClassNotFoundException { protected Class<?> findClass(String name) throws ClassNotFoundException {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment