Author: hardy.ferentschik
Date: 2010-05-19 11:46:02 -0400 (Wed, 19 May 2010)
New Revision: 19551
Modified:
validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/util/LoggerFactory.java
validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/util/Version.java
Log:
HV-274 Made sure helper classes cannot be instantiated
Modified:
validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/util/LoggerFactory.java
===================================================================
---
validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/util/LoggerFactory.java 2010-05-19
15:44:55 UTC (rev 19550)
+++
validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/util/LoggerFactory.java 2010-05-19
15:46:02 UTC (rev 19551)
@@ -28,5 +28,10 @@
StackTraceElement directCaller = t.getStackTrace()[1];
return org.slf4j.LoggerFactory.getLogger( directCaller.getClassName() );
}
+
+ // private constructor to avoid instantiation
+ private LoggerFactory(){
+
+ }
}
Modified:
validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/util/Version.java
===================================================================
---
validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/util/Version.java 2010-05-19
15:44:55 UTC (rev 19550)
+++
validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/util/Version.java 2010-05-19
15:46:02 UTC (rev 19551)
@@ -58,4 +58,9 @@
public static void touch() {
}
+
+ // helper class should not have a public constructor
+ private Version() {
+
+ }
}
Show replies by date