Migrate remaining use of ClassLoader.loadClass to Class.forName
Closes gh-19824
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2019 the original author or authors.
|
||||
* Copyright 2012-2020 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.
|
||||
@@ -93,7 +93,7 @@ public class DependencyCustomizer {
|
||||
protected boolean canAdd() {
|
||||
for (String className : classNames) {
|
||||
try {
|
||||
DependencyCustomizer.this.loader.loadClass(className);
|
||||
Class.forName(className, false, DependencyCustomizer.this.loader);
|
||||
}
|
||||
catch (Exception ex) {
|
||||
return true;
|
||||
@@ -116,7 +116,7 @@ public class DependencyCustomizer {
|
||||
protected boolean canAdd() {
|
||||
for (String className : classNames) {
|
||||
try {
|
||||
DependencyCustomizer.this.loader.loadClass(className);
|
||||
Class.forName(className, false, DependencyCustomizer.this.loader);
|
||||
return false;
|
||||
}
|
||||
catch (Exception ex) {
|
||||
|
||||
Reference in New Issue
Block a user