chenzhiguo on Nostr: ...
我认为这个单例对象是不安全的,synchronized内部缺少第二次检查,会生成多个对象,不是吗?
Published at
2023-02-08 09:43:37Event JSON
{
"id": "64e16f56f3dfe807aa9242e1228bbbaf9df59ab129f6caa84ac1feb0eb9b1917",
"pubkey": "aae9cfdb3113db442c1ad8d4c670a28091e5267748e71d2c1e189e423dbea1bf",
"created_at": 1675849417,
"kind": 1,
"tags": [
[
"e",
"02384d7b2cb74c728c4ee3cda470f1163b6e1feb37e9721cd42b5beb4b575c7e",
""
],
[
"e",
"b0213e0060adbbae0cbcc3dddbf89959f4c50c82ad1d0a739016ea0278b07da3"
],
[
"p",
"5c10ed0678805156d39ef1ef6d46110fe1e7e590ae04986ccf48ba1299cb53e2"
]
],
"content": "我认为这个单例对象是不安全的,synchronized内部缺少第二次检查,会生成多个对象,不是吗?",
"sig": "fb9d8da8cd5704abf427ff1bc52a129eb0c9bedfd0739e2814c001cc5af4ab6a405a8374fa8d3e70ef903f15ca01c77339f330808d0b31954c6f3393ccea6326"
}