摘要:
上篇我们介绍了单例模式的几种创建方式(传送门:https://www.cnblogs.com/Rnan/p/16685539.html), 但是这都是基于,不会通过反射调用对象的私有化构造器,我们举个例子,看下java反射攻击单例模式: public class Singleton { public 阅读全文
摘要:
我们可以先由源码注释来了解intern(); When the intern method is invoked, if the pool already contains astring equal to this {@code String} object as determined bythe 阅读全文