util classes should be final with a private constructor

This commit is contained in:
Sebastian Sdorra
2013-02-11 15:28:14 +01:00
parent 961c6f7f02
commit 114834d257
22 changed files with 232 additions and 51 deletions

View File

@@ -30,6 +30,7 @@
*/
package sonia.scm.plugin.ext;
//~--- non-JDK imports --------------------------------------------------------
@@ -44,9 +45,17 @@ import java.lang.annotation.Annotation;
*
* @author Sebastian Sdorra
*/
public class Extensions
public final class Extensions
{
/**
* Constructs ...
*
*/
private Extensions() {}
//~--- methods --------------------------------------------------------------
/**
* Method description
*

View File

@@ -30,6 +30,7 @@
*/
package sonia.scm.upgrade;
//~--- non-JDK imports --------------------------------------------------------
@@ -46,7 +47,7 @@ import java.util.regex.Pattern;
*
* @author Sebastian Sdorra
*/
public class ClientDateFormatConverter
public final class ClientDateFormatConverter
{
/** Field description */
@@ -58,12 +59,20 @@ public class ClientDateFormatConverter
private static final Logger logger =
LoggerFactory.getLogger(ClientDateFormatConverter.class);
//~--- constructors ---------------------------------------------------------
/**
* Constructs ...
*
*/
private ClientDateFormatConverter() {}
//~--- methods --------------------------------------------------------------
/**
* Documentations:
* - Extjs: http://trac.geoext.org/browser/ext/3.4.0/docs/source/Date.html
* - Moments: http://momentjs.com/docs/#/displaying/format/
* - Moments: http://momentjs.com/docs/#/displaying/format
*
*
* @param value
@@ -104,8 +113,8 @@ public class ClientDateFormatConverter
result = replaceDateFormatChars(result, "T", "z");
logger.debug(
"converted extjs date format \"{}\" to moments date format \"{}\"", value,
result);
"converted extjs date format \"{}\" to moments date format \"{}\"",
value, result);
return result;
}

View File

@@ -30,6 +30,7 @@
*/
package sonia.scm.user;
//~--- non-JDK imports --------------------------------------------------------
@@ -43,7 +44,7 @@ import sonia.scm.HandlerEvent;
*
* @author Sebastian Sdorra
*/
public class UserEventHack
public final class UserEventHack
{
/**
@@ -52,6 +53,14 @@ public class UserEventHack
private static final Logger logger =
LoggerFactory.getLogger(UserEventHack.class);
//~--- constructors ---------------------------------------------------------
/**
* Constructs ...
*
*/
private UserEventHack() {}
//~--- methods --------------------------------------------------------------
/**

View File

@@ -30,6 +30,7 @@
*/
package sonia.scm.util;
//~--- non-JDK imports --------------------------------------------------------
@@ -43,7 +44,7 @@ import sonia.scm.DecoratorFactory;
*
* @author Sebastian Sdorra
*/
public class Decorators
public final class Decorators
{
/**
@@ -52,6 +53,14 @@ public class Decorators
private static final Logger logger =
LoggerFactory.getLogger(Decorators.class);
//~--- constructors ---------------------------------------------------------
/**
* Constructs ...
*
*/
private Decorators() {}
//~--- methods --------------------------------------------------------------
/**