From 291b85b855125459e00071a07e65cffbeacce319 Mon Sep 17 00:00:00 2001 From: Punny <41753947+Punny520@users.noreply.github.com> Date: Wed, 29 May 2024 15:28:09 +0800 Subject: [PATCH] =?UTF-8?q?Update=20=E8=AE=BE=E8=AE=A1=E6=A8=A1=E5=BC=8F?= =?UTF-8?q?=20=20-=20=E5=8D=95=E4=BE=8B.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 少写了一个字 --- ...\241\346\250\241\345\274\217 - \345\215\225\344\276\213.md" | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git "a/notes/\350\256\276\350\256\241\346\250\241\345\274\217 - \345\215\225\344\276\213.md" "b/notes/\350\256\276\350\256\241\346\250\241\345\274\217 - \345\215\225\344\276\213.md" index 3a3e18afc0..277b6dae8e 100644 --- "a/notes/\350\256\276\350\256\241\346\250\241\345\274\217 - \345\215\225\344\276\213.md" +++ "b/notes/\350\256\276\350\256\241\346\250\241\345\274\217 - \345\215\225\344\276\213.md" @@ -184,7 +184,7 @@ secondName 该实现可以防止反射攻击。在其它实现中,通过 setAccessible() 方法可以将私有构造函数的访问级别设置为 public,然后调用构造函数从而实例化对象,如果要防止这种攻击,需要在构造函数中添加防止多次实例化的代码。该实现是由 JVM 保证只会实例化一次,因此不会出现上述的反射攻击。 -该实现在多次序列化和序列化之后,不会得到多个实例。而其它实现需要使用 transient 修饰所有字段,并且实现序列化和反序列化的方法。 +该实现在多次序列化和反序列化之后,不会得到多个实例。而其它实现需要使用 transient 修饰所有字段,并且实现序列化和反序列化的方法。 ### Examples