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

@@ -44,7 +44,7 @@ import sonia.scm.util.ServiceUtil;
*
* @author Sebastian Sdorra
*/
public class ScmClient
public final class ScmClient
{
/** Field description */
@@ -53,6 +53,14 @@ public class ScmClient
/** the logger for ScmClient */
private static final Logger logger = LoggerFactory.getLogger(ScmClient.class);
//~--- constructors ---------------------------------------------------------
/**
* Constructs ...
*
*/
private ScmClient() {}
//~--- methods --------------------------------------------------------------
/**
@@ -68,8 +76,8 @@ public class ScmClient
* @throws ScmClientException
*/
public static ScmClientSession createSession(String url, String username,
String password)
throws ScmClientException
String password)
throws ScmClientException
{
return getProvider().createSession(url, username, password);
}
@@ -85,7 +93,7 @@ public class ScmClient
* @throws ScmClientException
*/
public static ScmClientSession createSession(String url)
throws ScmClientException
throws ScmClientException
{
return getProvider().createSession(url, null, null);
}
@@ -119,7 +127,7 @@ public class ScmClient
else if (logger.isInfoEnabled())
{
logger.info("create ScmClient with provider {}",
provider.getClass().getName());
provider.getClass().getName());
}
return provider;