Skip to content

Commit 5ecbc05

Browse files
authored
Merge pull request #2016 from ruqinhu/master
Remove unnecessary null check in ClassLoaderWrapper
2 parents 7548814 + 9d99851 commit 5ecbc05

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/main/java/org/apache/ibatis/io/ClassLoaderWrapper.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2009-2019 the original author or authors.
2+
* Copyright 2009-2020 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.
@@ -183,11 +183,7 @@ Class<?> classForName(String name, ClassLoader[] classLoader) throws ClassNotFou
183183

184184
try {
185185

186-
Class<?> c = Class.forName(name, true, cl);
187-
188-
if (null != c) {
189-
return c;
190-
}
186+
return Class.forName(name, true, cl);
191187

192188
} catch (ClassNotFoundException e) {
193189
// we'll ignore this until all classloaders fail to locate the class

0 commit comments

Comments
 (0)