Remove unused import statements and other unnecessary code
This commit is contained in:
parent
60cbbba73b
commit
84416e8a43
26 changed files with 15 additions and 72 deletions
|
@ -17,7 +17,6 @@
|
|||
package helma.framework;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.HashMap;
|
||||
import javax.servlet.http.Cookie;
|
||||
|
||||
/**
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
package helma.framework;
|
||||
|
||||
import java.rmi.*;
|
||||
import java.util.Vector;
|
||||
|
||||
/**
|
||||
* RMI interface for an application. Currently only execute is used and supported.
|
||||
|
|
|
@ -16,9 +16,7 @@
|
|||
|
||||
package helma.framework;
|
||||
|
||||
import helma.framework.core.Application;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
|
||||
package helma.framework;
|
||||
|
||||
import helma.objectmodel.*;
|
||||
import helma.util.Base64;
|
||||
import helma.util.SystemMap;
|
||||
import java.io.*;
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
|
||||
package helma.framework;
|
||||
|
||||
import helma.framework.core.Application;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
package helma.framework;
|
||||
|
||||
import helma.framework.core.Skin;
|
||||
import helma.objectmodel.*;
|
||||
import helma.util.*;
|
||||
import java.io.*;
|
||||
import java.security.*;
|
||||
|
|
|
@ -24,13 +24,10 @@ import helma.objectmodel.*;
|
|||
import helma.objectmodel.db.*;
|
||||
import helma.scripting.*;
|
||||
import helma.util.*;
|
||||
import org.apache.xmlrpc.*;
|
||||
import java.io.*;
|
||||
import java.lang.reflect.*;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URLEncoder;
|
||||
import java.rmi.*;
|
||||
import java.rmi.server.*;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
|
@ -861,7 +858,7 @@ public final class Application implements IPathElement, Runnable {
|
|||
|
||||
// first try to get them from subnodes (db)
|
||||
for (Enumeration e = users.getSubnodes(); e.hasMoreElements();) {
|
||||
list.add((INode) e.nextElement());
|
||||
list.add(e.nextElement());
|
||||
}
|
||||
|
||||
// if none, try to get them from properties (internal db)
|
||||
|
@ -979,7 +976,7 @@ public final class Application implements IPathElement, Runnable {
|
|||
|
||||
try {
|
||||
INode users = getUserRoot();
|
||||
Node unode = (Node) users.getNode(uname);
|
||||
Node unode = (Node) users.getChildElement(uname);
|
||||
String pw = unode.getString("password");
|
||||
|
||||
if ((pw != null) && pw.equals(password)) {
|
||||
|
@ -1442,7 +1439,7 @@ public final class Application implements IPathElement, Runnable {
|
|||
r.start();
|
||||
} else {
|
||||
try {
|
||||
thisEvaluator.invokeFunction((INode) null, j.getFunction(),
|
||||
thisEvaluator.invokeFunction(null, j.getFunction(),
|
||||
new Object[0], j.getTimeout());
|
||||
} catch (Exception ex) {
|
||||
logEvent("error running " + j + ": " + ex.toString());
|
||||
|
@ -1820,7 +1817,7 @@ public final class Application implements IPathElement, Runnable {
|
|||
p.writeInt(sessions.size());
|
||||
|
||||
for (Enumeration e = sessions.elements(); e.hasMoreElements();) {
|
||||
p.writeObject((Session) e.nextElement());
|
||||
p.writeObject(e.nextElement());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1892,7 +1889,7 @@ public final class Application implements IPathElement, Runnable {
|
|||
|
||||
public void run() {
|
||||
try {
|
||||
thisEvaluator.invokeFunction((INode) null, job.getFunction(),
|
||||
thisEvaluator.invokeFunction(null, job.getFunction(),
|
||||
new Object[0], job.getTimeout());
|
||||
} catch (Exception ex) {
|
||||
// gets logged in RequestEvaluator
|
||||
|
|
|
@ -22,10 +22,8 @@ import helma.util.SystemMap;
|
|||
import helma.util.WrappedMap;
|
||||
import java.io.File;
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.Enumeration;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
@ -146,7 +144,7 @@ public class ApplicationBean implements Serializable {
|
|||
return null;
|
||||
}
|
||||
|
||||
Session session = session = app.checkSession(sessionID.trim());
|
||||
Session session = app.checkSession(sessionID.trim());
|
||||
|
||||
if (session == null) {
|
||||
return null;
|
||||
|
|
|
@ -20,7 +20,6 @@ import helma.framework.*;
|
|||
import helma.objectmodel.*;
|
||||
import helma.objectmodel.db.*;
|
||||
import helma.scripting.*;
|
||||
import helma.util.*;
|
||||
import java.lang.reflect.*;
|
||||
import java.util.*;
|
||||
|
||||
|
@ -884,7 +883,7 @@ public final class RequestEvaluator implements Runnable {
|
|||
}
|
||||
}
|
||||
|
||||
private synchronized void checkThread() throws InterruptedException {
|
||||
private synchronized void checkThread() {
|
||||
if (app.stopped) {
|
||||
throw new ApplicationStoppedException();
|
||||
}
|
||||
|
|
|
@ -19,7 +19,6 @@ package helma.framework.core;
|
|||
import helma.objectmodel.*;
|
||||
import helma.objectmodel.db.*;
|
||||
import java.io.*;
|
||||
import java.net.URLEncoder;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
|
|
|
@ -19,7 +19,6 @@ package helma.framework.core;
|
|||
import helma.objectmodel.INode;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
|
||||
/**
|
||||
* The SessionBean wraps a <code>Session</code> object and
|
||||
|
|
|
@ -18,13 +18,10 @@ package helma.framework.core;
|
|||
|
||||
import helma.framework.*;
|
||||
import helma.objectmodel.ConcurrencyException;
|
||||
import helma.objectmodel.INode;
|
||||
import helma.scripting.*;
|
||||
import helma.util.HtmlEncoder;
|
||||
import helma.util.SystemMap;
|
||||
import helma.util.WrappedMap;
|
||||
import java.io.*;
|
||||
import java.net.URLEncoder;
|
||||
import helma.util.UrlEncoded;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
|
@ -166,7 +163,7 @@ public final class Skin {
|
|||
public boolean containsMacro(String macroname) {
|
||||
for (int i = 0; i < macros.length; i++) {
|
||||
if (macros[i] instanceof Macro) {
|
||||
Macro m = (Macro) macros[i];
|
||||
Macro m = macros[i];
|
||||
|
||||
if (macroname.equals(m.fullName)) {
|
||||
return true;
|
||||
|
@ -653,7 +650,7 @@ public final class Skin {
|
|||
break;
|
||||
|
||||
case ENCODE_URL:
|
||||
buffer.append(URLEncoder.encode(text));
|
||||
buffer.append(UrlEncoded.encode(text));
|
||||
|
||||
break;
|
||||
|
||||
|
|
|
@ -18,7 +18,6 @@ package helma.framework.core;
|
|||
|
||||
import helma.util.Updatable;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* This represents a File containing a Hop skin
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
|
||||
package helma.framework.core;
|
||||
|
||||
import helma.objectmodel.*;
|
||||
import helma.objectmodel.db.DbMapping;
|
||||
import helma.scripting.*;
|
||||
import helma.util.*;
|
||||
|
@ -355,7 +354,6 @@ public final class TypeManager {
|
|||
|
||||
/* if (System.currentTimeMillis() - proto.getLastCheck() < 1000)
|
||||
return; */
|
||||
File dir = proto.getDirectory();
|
||||
HashSet updateSet = null;
|
||||
HashSet createSet = null;
|
||||
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
|
||||
package helma.framework.core;
|
||||
|
||||
import helma.framework.*;
|
||||
import helma.objectmodel.db.DbMapping;
|
||||
import helma.scripting.*;
|
||||
import helma.util.SystemProperties;
|
||||
|
|
|
@ -27,7 +27,6 @@ import org.mortbay.http.ajp.*;
|
|||
import org.mortbay.util.*;
|
||||
import java.io.*;
|
||||
import java.net.*;
|
||||
import java.rmi.*;
|
||||
import java.rmi.registry.*;
|
||||
import java.rmi.server.*;
|
||||
import java.util.*;
|
||||
|
@ -332,7 +331,7 @@ public class Server implements IPathElement, Runnable {
|
|||
/**
|
||||
* static main entry point.
|
||||
*/
|
||||
public static void main(String[] args) throws IOException {
|
||||
public static void main(String[] args) {
|
||||
// check if we are running on a Java 2 VM - otherwise exit with an error message
|
||||
String javaVersion = System.getProperty("java.version");
|
||||
|
||||
|
|
|
@ -18,11 +18,6 @@ package helma.main.launcher;
|
|||
|
||||
import java.net.URL;
|
||||
import java.net.URLClassLoader;
|
||||
import java.security.CodeSource;
|
||||
import java.security.PermissionCollection;
|
||||
import java.security.Permissions;
|
||||
import java.security.Policy;
|
||||
import java.util.Hashtable;
|
||||
|
||||
/**
|
||||
* ClassLoader that is able to exclude certain packages from loading.
|
||||
|
|
|
@ -22,7 +22,6 @@ import java.lang.reflect.Method;
|
|||
import java.net.URL;
|
||||
import java.net.URLClassLoader;
|
||||
import java.net.URLDecoder;
|
||||
import java.security.Policy;
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
|
|
|
@ -492,10 +492,6 @@ public abstract class AbstractServletClient extends HttpServlet {
|
|||
|
||||
|
||||
/**
|
||||
* Put name value pair in map.
|
||||
*
|
||||
* @param b the character value byte
|
||||
*
|
||||
* Put name and value pair in map. When name already exist, add value
|
||||
* to array of values.
|
||||
*/
|
||||
|
|
|
@ -19,9 +19,6 @@ package helma.servlet;
|
|||
import helma.framework.*;
|
||||
import helma.framework.core.Application;
|
||||
import helma.main.*;
|
||||
import helma.util.*;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
import javax.servlet.*;
|
||||
|
||||
/**
|
||||
|
|
|
@ -17,12 +17,9 @@
|
|||
package helma.servlet;
|
||||
|
||||
import helma.framework.*;
|
||||
import java.io.*;
|
||||
import java.rmi.Naming;
|
||||
import java.rmi.RemoteException;
|
||||
import java.util.Hashtable;
|
||||
import javax.servlet.*;
|
||||
import javax.servlet.http.*;
|
||||
|
||||
/**
|
||||
* This is the HOP servlet adapter. This class communicates with any
|
||||
|
|
|
@ -17,10 +17,7 @@
|
|||
package helma.servlet;
|
||||
|
||||
import helma.framework.*;
|
||||
import java.io.*;
|
||||
import java.rmi.Naming;
|
||||
import java.rmi.RemoteException;
|
||||
import java.util.*;
|
||||
import javax.servlet.*;
|
||||
|
||||
/**
|
||||
|
|
|
@ -18,9 +18,7 @@ package helma.servlet;
|
|||
|
||||
import helma.framework.*;
|
||||
import helma.framework.core.Application;
|
||||
import helma.util.*;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
import javax.servlet.*;
|
||||
|
||||
/**
|
||||
|
|
|
@ -16,10 +16,6 @@
|
|||
|
||||
package helma.util;
|
||||
|
||||
import java.awt.*;
|
||||
import java.awt.image.*;
|
||||
import java.io.*;
|
||||
import java.text.*;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
|
|
|
@ -393,7 +393,7 @@ public final class Logger {
|
|||
/**
|
||||
* test main method
|
||||
*/
|
||||
public static void main(String[] args) throws IOException {
|
||||
public static void main(String[] args) {
|
||||
Logger log = new Logger(".", "testlog");
|
||||
long start = System.currentTimeMillis();
|
||||
|
||||
|
@ -409,8 +409,6 @@ public final class Logger {
|
|||
log.log("done: " + (System.currentTimeMillis() - start));
|
||||
System.err.println(System.currentTimeMillis() - start);
|
||||
log.close();
|
||||
|
||||
// System.exit (0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -18,7 +18,6 @@ package helma.util;
|
|||
|
||||
import org.w3c.dom.Document;
|
||||
import org.xml.sax.InputSource;
|
||||
import org.xml.sax.Parser;
|
||||
import org.xml.sax.SAXException;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
@ -30,15 +29,12 @@ import java.net.URL;
|
|||
import javax.xml.parsers.DocumentBuilder;
|
||||
import javax.xml.parsers.DocumentBuilderFactory;
|
||||
import javax.xml.parsers.ParserConfigurationException;
|
||||
import javax.xml.parsers.SAXParser;
|
||||
import javax.xml.parsers.SAXParserFactory;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public class XmlUtils {
|
||||
private static DocumentBuilderFactory domBuilderFactory = null;
|
||||
private static SAXParserFactory saxParserFactory = null;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -89,13 +85,10 @@ public class XmlUtils {
|
|||
*
|
||||
* @return ...
|
||||
*
|
||||
* @throws SAXException ...
|
||||
* @throws IOException ...
|
||||
* @throws ParserConfigurationException ...
|
||||
*/
|
||||
public static Document parseHtml(Object obj)
|
||||
throws SAXException, IOException,
|
||||
ParserConfigurationException {
|
||||
throws IOException {
|
||||
try {
|
||||
Class.forName("org.apache.html.dom.HTMLBuilder");
|
||||
} catch (Throwable notfound) {
|
||||
|
|
Loading…
Add table
Reference in a new issue