hym1224 / java

0 stars 0 forks source link

Singleton pattern security. #6

Open hym1224 opened 6 years ago

hym1224 commented 6 years ago

from https://www.javadoop.com/post/singleton-not-single?hmsr=toutiao.io&utm_medium=toutiao.io&utm_source=toutiao.io

hym1224 commented 6 years ago

1:Damage by reflection prevent 1: enum implements

2:Damage by serialization prevent 2: add readResolve method

conclusion:enum implements