Utility classes should not have public constructors

This commit is contained in:
ayman abdelghany 2016-03-21 16:32:42 +02:00
parent a731362234
commit ce28559041
10 changed files with 30 additions and 0 deletions

View file

@ -32,6 +32,9 @@ public class ResponseHandler {
private final static Pattern characterEncodingPattern = Pattern.compile("charset=([.[^; ]]*)");
private ResponseHandler() {
}
public static String getCharacterEncoding(final URLConnection connection) {
return getCharacterEncoding(connection.getContentType());
}

View file

@ -46,6 +46,9 @@ import com.rometools.rome.io.SyndFeedOutput;
*/
public class FeedAggregator {
private FeedAggregator() {
}
public static void main(final String[] args) {
boolean ok = false;

View file

@ -37,6 +37,9 @@ import com.rometools.rome.feed.synd.SyndFeed;
*/
public class FeedReader {
private FeedReader() {
}
public static void main(final String[] args) {
boolean ok = false;

View file

@ -28,6 +28,9 @@ import com.rometools.rome.feed.synd.SyndFeed;
*/
public class GeoRSSUtils {
private GeoRSSUtils() {
}
/**
* This convenience method checks whether there is any geoRss Element and will return it (georss
* simple or W3GGeo).

View file

@ -28,6 +28,9 @@ public class AtomClientFactory {
Atom10Parser.setResolveURIs(true);
}
private AtomClientFactory() {
}
/**
* Create AtomService by reading service doc from Atom Server.
*/

View file

@ -32,6 +32,9 @@ class FactoryFinder {
private static SecuritySupport ss = new SecuritySupport();
private static boolean firstTime = true;
private FactoryFinder() {
}
private static void dPrint(final String msg) {
if (debug) {
System.err.println("Propono: " + msg);

View file

@ -31,6 +31,9 @@ public class BlogConnectionFactory {
private static String METAWEBLOG_IMPL_CLASS = "com.rometools.propono.blogclient.metaweblog.MetaWeblogConnection";
private BlogConnectionFactory() {
}
/**
* Create a connection to a blog server.
*

View file

@ -44,6 +44,9 @@ public class BeanIntrospector {
private static final String GETTER = "get";
private static final String BOOLEAN_GETTER = "is";
private BeanIntrospector() {
}
/**
* Extract all {@link PropertyDescriptor}s for properties with getters and setters for the given
* class.

View file

@ -30,6 +30,9 @@ public class ModuleUtils {
private static final Logger LOG = LoggerFactory.getLogger(ModuleUtils.class);
private ModuleUtils() {
}
public static List<Module> cloneModules(final List<Module> modules) {
List<Module> cModules = null;
if (modules != null) {

View file

@ -8,6 +8,9 @@ package com.rometools.rome.feed.synd.impl;
*/
public class URINormalizer {
private URINormalizer() {
}
/**
* Normalizes an URI as specified in RFC 2396bis.
* <p>