mirror of
https://github.com/apache/struts.git
synced 2026-08-07 15:46:57 +00:00
Remove unused private methods
This commit is contained in:
-17
@@ -333,23 +333,6 @@ public class DefaultClassFinder implements ClassFinder {
|
||||
return classes;
|
||||
}
|
||||
|
||||
private static List<URL> getURLs(ClassLoaderInterface classLoader, String[] dirNames) {
|
||||
List<URL> urls = new ArrayList<>();
|
||||
for (String dirName : dirNames) {
|
||||
try {
|
||||
Enumeration<URL> classLoaderURLs = classLoader.getResources(dirName);
|
||||
while (classLoaderURLs.hasMoreElements()) {
|
||||
URL url = classLoaderURLs.nextElement();
|
||||
urls.add(url);
|
||||
}
|
||||
} catch (IOException ioe) {
|
||||
LOG.error("Could not read directory [{}]", dirName, ioe);
|
||||
}
|
||||
}
|
||||
|
||||
return urls;
|
||||
}
|
||||
|
||||
private List<String> file(URL location) {
|
||||
List<String> classNames = new ArrayList<>();
|
||||
File dir = new File(URLDecoder.decode(location.getPath()));
|
||||
|
||||
@@ -87,23 +87,6 @@ public final class AstIdentifier extends SimpleNode {
|
||||
ctx.getELResolver().setValue(ctx, null, this.image, value);
|
||||
}
|
||||
|
||||
private final Object invokeTarget(EvaluationContext ctx, Object target,
|
||||
Object[] paramValues) throws ELException {
|
||||
if (target instanceof MethodExpression) {
|
||||
MethodExpression me = (MethodExpression) target;
|
||||
return me.invoke(ctx.getELContext(), paramValues);
|
||||
} else if (target == null) {
|
||||
throw new MethodNotFoundException("Identity '" + this.image
|
||||
+ "' was null and was unable to invoke");
|
||||
} else {
|
||||
throw new ELException(
|
||||
"Identity '"
|
||||
+ this.image
|
||||
+ "' does not reference a MethodExpression instance, returned type: "
|
||||
+ target.getClass().getName());
|
||||
}
|
||||
}
|
||||
|
||||
public Object invoke(EvaluationContext ctx, Class[] paramTypes,
|
||||
Object[] paramValues) throws ELException {
|
||||
return this.getMethodExpression(ctx).invoke(ctx.getELContext(), paramValues);
|
||||
|
||||
@@ -43,14 +43,6 @@ class Dumper {
|
||||
System.out.print(str);
|
||||
}
|
||||
|
||||
private void printString(String prefix, char[] chars, String suffix) {
|
||||
String str = null;
|
||||
if (chars != null) {
|
||||
str = new String(chars);
|
||||
}
|
||||
printString(prefix, str, suffix);
|
||||
}
|
||||
|
||||
private void printString(String prefix, String str, String suffix) {
|
||||
printIndent();
|
||||
if (str != null) {
|
||||
|
||||
@@ -711,16 +711,6 @@ class Generator {
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Generates the constructor. (shared by servlet and tag handler preamble
|
||||
* generation)
|
||||
*/
|
||||
private void generateConstructor(String className) {
|
||||
out.printil("public " + className + "() {");
|
||||
out.printil("}");
|
||||
out.println();
|
||||
}
|
||||
|
||||
/**
|
||||
* A visitor that generates codes for the elements in the page.
|
||||
*/
|
||||
|
||||
@@ -179,14 +179,6 @@ public class SmapUtil {
|
||||
return path.substring(path.lastIndexOf('/') + 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a file path corresponding to a potential SMAP input
|
||||
* for the given compilation input (JSP file).
|
||||
*/
|
||||
private static String inputSmapPath(String path) {
|
||||
return path.substring(0, path.lastIndexOf('.') + 1) + "smap";
|
||||
}
|
||||
|
||||
//*********************************************************************
|
||||
// Installation logic (from Robert Field, JSR-045 spec lead)
|
||||
private static class SDEInstaller {
|
||||
|
||||
Reference in New Issue
Block a user