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

[squid:S1118] Utility classes should not have public constructors
This commit is contained in:
Kalen (Konloch) Kinloch 2016-06-17 14:55:19 -06:00 committed by GitHub
commit bca0f59dcb
19 changed files with 62 additions and 5 deletions

View file

@ -12,10 +12,13 @@ import java.io.*;
public class ClassFileUtil {
private ClassFileUtil() {
}
/*
* Lecture rapide de la structure de la classe et extraction du nom du
* repoertoire de base.
*/
* Lecture rapide de la structure de la classe et extraction du nom du
* repoertoire de base.
*/
public static String ExtractDirectoryPath(String pathToClass) throws Exception {
DataInputStream dis = null;
String directoryPath = null;

View file

@ -4,6 +4,9 @@ import jd.core.util.TypeNameUtil;
public class CommonTypeNameUtil
{
private CommonTypeNameUtil() {
}
public static String InternalPathToQualifiedTypeName(String internalPath)
{
String internalTypeName = internalPath.substring(0, internalPath.length()-6);

View file

@ -2,6 +2,9 @@ package jd.cli.util;
public class VersionUtil
{
private VersionUtil() {
}
public static String getJDKVersion(int majorVersion, int minorVersion)
{
StringBuffer sb = new StringBuffer(20);

View file

@ -25,6 +25,9 @@ package org.apache.commons.cli;
*/
final class OptionValidator
{
private OptionValidator() {
}
/**
* Validates whether <code>opt</code> is a permissible Option
* shortOpt. The rules that specify if the <code>opt</code>

View file

@ -87,6 +87,9 @@ public class PatternOptionBuilder
/** URL class */
public static final Class<URL> URL_VALUE = URL.class;
private PatternOptionBuilder() {
}
/**
* Retrieve the class that <code>ch</code> represents.
*

View file

@ -32,6 +32,9 @@ import java.util.Date;
*/
public class TypeHandler
{
private TypeHandler() {
}
/**
* Returns the <code>Object</code> of type <code>obj</code>
* with the value of <code>str</code>.

View file

@ -24,6 +24,9 @@ package org.apache.commons.cli;
*/
final class Util
{
private Util() {
}
/**
* Remove the hyphens from the beginning of <code>str</code> and
* return the new String.

View file

@ -29,6 +29,9 @@ package org.apache.commons.codec.binary;
*/
public class CharSequenceUtils {
private CharSequenceUtils() {
}
/**
* Green implementation of regionMatches.
*

View file

@ -38,6 +38,9 @@ import java.nio.charset.Charset;
*/
public class StringUtils {
private StringUtils() {
}
/**
* <p>
* Compares two CharSequences, returning <code>true</code> if they represent equal sequences of characters.

View file

@ -36,6 +36,9 @@ public class DigestUtils {
private static final int STREAM_BUFFER_LENGTH = 1024;
private DigestUtils() {
}
/**
* Read through an ByteBuffer and returns the digest for the data
*

View file

@ -44,6 +44,9 @@ public final class HmacUtils {
private static final int STREAM_BUFFER_LENGTH = 1024;
private HmacUtils() {
}
/**
* Returns an initialized <code>Mac</code> for the HmacMD5 algorithm.
* <p>

View file

@ -30,6 +30,9 @@ import org.apache.commons.codec.StringEncoder;
*/
final class SoundexUtils {
private SoundexUtils() {
}
/**
* Cleans up the input string before Soundex processing by only returning
* upper case letters.

View file

@ -29,6 +29,9 @@ import org.apache.commons.codec.DecoderException;
*/
class Utils {
private Utils() {
}
/**
* Returns the numeric value of the character <code>b</code> in radix 16.
*

View file

@ -141,6 +141,9 @@ public class BytecodeViewer {
public static boolean pingback = false;
public static boolean deleteForiegnLibraries = true;
private BytecodeViewer() {
}
/**
* Main startup
*

View file

@ -41,6 +41,9 @@ import java.util.zip.ZipInputStream;
public class JarUtils {
private JarUtils() {
}
/**
* Loads the classes and resources from the input jar file
* @param jarFile the input jar file

View file

@ -36,6 +36,9 @@ public class MiscUtils {
private static final String AN = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
private static Random rnd = new Random();
private MiscUtils() {
}
/**
* Returns a random string without numbers
* @param len the length of the String

View file

@ -45,6 +45,9 @@ public class BytecodeViewer {
private static URLClassLoader cl;
private BytecodeViewer() {
}
/**
* Grab the loader instance
*

View file

@ -34,8 +34,11 @@ import java.util.List;
public class FieldNodeDecompiler {
private FieldNodeDecompiler() {
}
public static PrefixedStringBuilder decompile(PrefixedStringBuilder sb,
FieldNode f) {
FieldNode f) {
String s = getAccessString(f.access);
sb.append(s);
if (s.length() > 0)

View file

@ -61,7 +61,10 @@ public final class PluginManager {
launchStrategies.put("rb", ruby);
launchStrategies.put("ruby", ruby);
}
private PluginManager() {
}
/**
* Runs a new plugin instance
* @param newPluginInstance the new plugin instance