-
Notifications
You must be signed in to change notification settings - Fork 46k
Commit 61fa045
authored
Update classloader.md
判断一个类加载器是不是被BootstrapClassLoader 加载的,应该使用XXXClaissLoader.getClass().getClassLoader()是不是为null来判断,getParent()只是获取类加载器在委派链中的父类加载器,两个是不同概念。我可以自定义一个类加载器,通过new MyClassLoader(null)主动设置parent为null打破双亲委派。但是我的MyClassLoader这个类是被AppClassLoader加载的。1 parent 93c6cdd commit 61fa045
1 file changed
+1
-1
lines changedLines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
101 | 101 |
| |
102 | 102 |
| |
103 | 103 |
| |
104 | - | ||
104 | + | ||
105 | 105 |
| |
106 | 106 |
| |
107 | 107 |
| |
|
0 commit comments