[squid:S1118] Utility classes should not have public constructors
This commit is contained in:
parent
71d4093c8a
commit
5be1551fb4
19 changed files with 62 additions and 5 deletions
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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.
|
||||
*
|
||||
|
|
|
@ -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>.
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -29,6 +29,9 @@ package org.apache.commons.codec.binary;
|
|||
*/
|
||||
public class CharSequenceUtils {
|
||||
|
||||
private CharSequenceUtils() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Green implementation of regionMatches.
|
||||
*
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
*
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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.
|
||||
*
|
||||
|
|
|
@ -141,6 +141,9 @@ public class BytecodeViewer {
|
|||
public static boolean pingback = false;
|
||||
public static boolean deleteForiegnLibraries = true;
|
||||
|
||||
private BytecodeViewer() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Main startup
|
||||
*
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -45,6 +45,9 @@ public class BytecodeViewer {
|
|||
|
||||
private static URLClassLoader cl;
|
||||
|
||||
private BytecodeViewer() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Grab the loader instance
|
||||
*
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue