Skip to content

Commit

Permalink
Merge pull request #17 from eterrao/master
Browse files Browse the repository at this point in the history
Fixed static Singleton pattern not be final
  • Loading branch information
francistao authored Aug 18, 2016
2 parents d1f4276 + c93422b commit 4c40489
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Part1/DesignPattern/单例模式.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public class Singleton {
/**
* 静态初始化器,由JVM来保证线程安全
*/
private static Singleton instance = new Singleton();
private static final Singleton instance = new Singleton();
}
/**
Expand Down

0 comments on commit 4c40489

Please sign in to comment.