Merge pull request #284 from DevFactory/release/adding-private-constructor-fix-1

Utility classes should not have public constructors
This commit is contained in:
Patrick Gotthard 2016-03-23 22:10:27 +01:00
commit e91a99ccea
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 final static Pattern characterEncodingPattern = Pattern.compile("charset=([.[^; ]]*)");
private ResponseHandler() {
}
public static String getCharacterEncoding(final URLConnection connection) { public static String getCharacterEncoding(final URLConnection connection) {
return getCharacterEncoding(connection.getContentType()); return getCharacterEncoding(connection.getContentType());
} }

View file

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

View file

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

View file

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

View file

@ -28,6 +28,9 @@ public class AtomClientFactory {
Atom10Parser.setResolveURIs(true); Atom10Parser.setResolveURIs(true);
} }
private AtomClientFactory() {
}
/** /**
* Create AtomService by reading service doc from Atom Server. * 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 SecuritySupport ss = new SecuritySupport();
private static boolean firstTime = true; private static boolean firstTime = true;
private FactoryFinder() {
}
private static void dPrint(final String msg) { private static void dPrint(final String msg) {
if (debug) { if (debug) {
System.err.println("Propono: " + msg); 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 static String METAWEBLOG_IMPL_CLASS = "com.rometools.propono.blogclient.metaweblog.MetaWeblogConnection";
private BlogConnectionFactory() {
}
/** /**
* Create a connection to a blog server. * 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 GETTER = "get";
private static final String BOOLEAN_GETTER = "is"; private static final String BOOLEAN_GETTER = "is";
private BeanIntrospector() {
}
/** /**
* Extract all {@link PropertyDescriptor}s for properties with getters and setters for the given * Extract all {@link PropertyDescriptor}s for properties with getters and setters for the given
* class. * class.

View file

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

View file

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