提交 c725592b authored 作者: noelgrandin's avatar noelgrandin

singleton classes should have private constructors

上级 1311dfef
...@@ -33,6 +33,8 @@ public class Engine implements SessionFactory { ...@@ -33,6 +33,8 @@ public class Engine implements SessionFactory {
SysProperties.DELAY_WRONG_PASSWORD_MIN; SysProperties.DELAY_WRONG_PASSWORD_MIN;
private boolean jmx; private boolean jmx;
private Engine() {}
public static Engine getInstance() { public static Engine getInstance() {
return INSTANCE; return INSTANCE;
} }
......
...@@ -24,7 +24,7 @@ public class MultiDimension implements Comparator<long[]> { ...@@ -24,7 +24,7 @@ public class MultiDimension implements Comparator<long[]> {
private static final MultiDimension INSTANCE = new MultiDimension(); private static final MultiDimension INSTANCE = new MultiDimension();
protected MultiDimension() { private MultiDimension() {
// don't allow construction by normal code // don't allow construction by normal code
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论