Remove unused import statements and other unnecessary code

This commit is contained in:
hns 2003-10-22 16:34:06 +00:00
parent 60cbbba73b
commit 84416e8a43
26 changed files with 15 additions and 72 deletions

View file

@ -17,7 +17,6 @@
package helma.framework; package helma.framework;
import java.io.Serializable; import java.io.Serializable;
import java.util.HashMap;
import javax.servlet.http.Cookie; import javax.servlet.http.Cookie;
/** /**

View file

@ -17,7 +17,6 @@
package helma.framework; package helma.framework;
import java.rmi.*; import java.rmi.*;
import java.util.Vector;
/** /**
* RMI interface for an application. Currently only execute is used and supported. * RMI interface for an application. Currently only execute is used and supported.

View file

@ -16,9 +16,7 @@
package helma.framework; package helma.framework;
import helma.framework.core.Application;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date;
import java.util.Map; import java.util.Map;
/** /**

View file

@ -16,7 +16,6 @@
package helma.framework; package helma.framework;
import helma.objectmodel.*;
import helma.util.Base64; import helma.util.Base64;
import helma.util.SystemMap; import helma.util.SystemMap;
import java.io.*; import java.io.*;

View file

@ -16,7 +16,6 @@
package helma.framework; package helma.framework;
import helma.framework.core.Application;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;
import java.util.Map; import java.util.Map;

View file

@ -17,7 +17,6 @@
package helma.framework; package helma.framework;
import helma.framework.core.Skin; import helma.framework.core.Skin;
import helma.objectmodel.*;
import helma.util.*; import helma.util.*;
import java.io.*; import java.io.*;
import java.security.*; import java.security.*;

View file

@ -24,13 +24,10 @@ import helma.objectmodel.*;
import helma.objectmodel.db.*; import helma.objectmodel.db.*;
import helma.scripting.*; import helma.scripting.*;
import helma.util.*; import helma.util.*;
import org.apache.xmlrpc.*;
import java.io.*; import java.io.*;
import java.lang.reflect.*; import java.lang.reflect.*;
import java.net.MalformedURLException; import java.net.MalformedURLException;
import java.net.URLEncoder;
import java.rmi.*; import java.rmi.*;
import java.rmi.server.*;
import java.util.*; import java.util.*;
/** /**
@ -861,7 +858,7 @@ public final class Application implements IPathElement, Runnable {
// first try to get them from subnodes (db) // first try to get them from subnodes (db)
for (Enumeration e = users.getSubnodes(); e.hasMoreElements();) { 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) // if none, try to get them from properties (internal db)
@ -979,7 +976,7 @@ public final class Application implements IPathElement, Runnable {
try { try {
INode users = getUserRoot(); INode users = getUserRoot();
Node unode = (Node) users.getNode(uname); Node unode = (Node) users.getChildElement(uname);
String pw = unode.getString("password"); String pw = unode.getString("password");
if ((pw != null) && pw.equals(password)) { if ((pw != null) && pw.equals(password)) {
@ -1442,7 +1439,7 @@ public final class Application implements IPathElement, Runnable {
r.start(); r.start();
} else { } else {
try { try {
thisEvaluator.invokeFunction((INode) null, j.getFunction(), thisEvaluator.invokeFunction(null, j.getFunction(),
new Object[0], j.getTimeout()); new Object[0], j.getTimeout());
} catch (Exception ex) { } catch (Exception ex) {
logEvent("error running " + j + ": " + ex.toString()); logEvent("error running " + j + ": " + ex.toString());
@ -1820,7 +1817,7 @@ public final class Application implements IPathElement, Runnable {
p.writeInt(sessions.size()); p.writeInt(sessions.size());
for (Enumeration e = sessions.elements(); e.hasMoreElements();) { 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() { public void run() {
try { try {
thisEvaluator.invokeFunction((INode) null, job.getFunction(), thisEvaluator.invokeFunction(null, job.getFunction(),
new Object[0], job.getTimeout()); new Object[0], job.getTimeout());
} catch (Exception ex) { } catch (Exception ex) {
// gets logged in RequestEvaluator // gets logged in RequestEvaluator

View file

@ -22,10 +22,8 @@ import helma.util.SystemMap;
import helma.util.WrappedMap; import helma.util.WrappedMap;
import java.io.File; import java.io.File;
import java.io.Serializable; import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.Enumeration; import java.util.Enumeration;
import java.util.HashMap;
import java.util.Iterator; import java.util.Iterator;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -146,7 +144,7 @@ public class ApplicationBean implements Serializable {
return null; return null;
} }
Session session = session = app.checkSession(sessionID.trim()); Session session = app.checkSession(sessionID.trim());
if (session == null) { if (session == null) {
return null; return null;

View file

@ -20,7 +20,6 @@ import helma.framework.*;
import helma.objectmodel.*; import helma.objectmodel.*;
import helma.objectmodel.db.*; import helma.objectmodel.db.*;
import helma.scripting.*; import helma.scripting.*;
import helma.util.*;
import java.lang.reflect.*; import java.lang.reflect.*;
import java.util.*; 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) { if (app.stopped) {
throw new ApplicationStoppedException(); throw new ApplicationStoppedException();
} }

View file

@ -19,7 +19,6 @@ package helma.framework.core;
import helma.objectmodel.*; import helma.objectmodel.*;
import helma.objectmodel.db.*; import helma.objectmodel.db.*;
import java.io.*; import java.io.*;
import java.net.URLEncoder;
import java.util.*; import java.util.*;
/** /**

View file

@ -19,7 +19,6 @@ package helma.framework.core;
import helma.objectmodel.INode; import helma.objectmodel.INode;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;
import java.util.HashMap;
/** /**
* The SessionBean wraps a <code>Session</code> object and * The SessionBean wraps a <code>Session</code> object and

View file

@ -18,13 +18,10 @@ package helma.framework.core;
import helma.framework.*; import helma.framework.*;
import helma.objectmodel.ConcurrencyException; import helma.objectmodel.ConcurrencyException;
import helma.objectmodel.INode;
import helma.scripting.*;
import helma.util.HtmlEncoder; import helma.util.HtmlEncoder;
import helma.util.SystemMap; import helma.util.SystemMap;
import helma.util.WrappedMap; import helma.util.WrappedMap;
import java.io.*; import helma.util.UrlEncoded;
import java.net.URLEncoder;
import java.util.*; import java.util.*;
/** /**
@ -166,7 +163,7 @@ public final class Skin {
public boolean containsMacro(String macroname) { public boolean containsMacro(String macroname) {
for (int i = 0; i < macros.length; i++) { for (int i = 0; i < macros.length; i++) {
if (macros[i] instanceof Macro) { if (macros[i] instanceof Macro) {
Macro m = (Macro) macros[i]; Macro m = macros[i];
if (macroname.equals(m.fullName)) { if (macroname.equals(m.fullName)) {
return true; return true;
@ -653,7 +650,7 @@ public final class Skin {
break; break;
case ENCODE_URL: case ENCODE_URL:
buffer.append(URLEncoder.encode(text)); buffer.append(UrlEncoded.encode(text));
break; break;

View file

@ -18,7 +18,6 @@ package helma.framework.core;
import helma.util.Updatable; import helma.util.Updatable;
import java.io.*; import java.io.*;
import java.util.*;
/** /**
* This represents a File containing a Hop skin * This represents a File containing a Hop skin

View file

@ -16,7 +16,6 @@
package helma.framework.core; package helma.framework.core;
import helma.objectmodel.*;
import helma.objectmodel.db.DbMapping; import helma.objectmodel.db.DbMapping;
import helma.scripting.*; import helma.scripting.*;
import helma.util.*; import helma.util.*;
@ -355,7 +354,6 @@ public final class TypeManager {
/* if (System.currentTimeMillis() - proto.getLastCheck() < 1000) /* if (System.currentTimeMillis() - proto.getLastCheck() < 1000)
return; */ return; */
File dir = proto.getDirectory();
HashSet updateSet = null; HashSet updateSet = null;
HashSet createSet = null; HashSet createSet = null;

View file

@ -16,7 +16,6 @@
package helma.framework.core; package helma.framework.core;
import helma.framework.*;
import helma.objectmodel.db.DbMapping; import helma.objectmodel.db.DbMapping;
import helma.scripting.*; import helma.scripting.*;
import helma.util.SystemProperties; import helma.util.SystemProperties;

View file

@ -27,7 +27,6 @@ import org.mortbay.http.ajp.*;
import org.mortbay.util.*; import org.mortbay.util.*;
import java.io.*; import java.io.*;
import java.net.*; import java.net.*;
import java.rmi.*;
import java.rmi.registry.*; import java.rmi.registry.*;
import java.rmi.server.*; import java.rmi.server.*;
import java.util.*; import java.util.*;
@ -332,7 +331,7 @@ public class Server implements IPathElement, Runnable {
/** /**
* static main entry point. * 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 // check if we are running on a Java 2 VM - otherwise exit with an error message
String javaVersion = System.getProperty("java.version"); String javaVersion = System.getProperty("java.version");

View file

@ -18,11 +18,6 @@ package helma.main.launcher;
import java.net.URL; import java.net.URL;
import java.net.URLClassLoader; 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. * ClassLoader that is able to exclude certain packages from loading.

View file

@ -22,7 +22,6 @@ import java.lang.reflect.Method;
import java.net.URL; import java.net.URL;
import java.net.URLClassLoader; import java.net.URLClassLoader;
import java.net.URLDecoder; import java.net.URLDecoder;
import java.security.Policy;
import java.util.ArrayList; import java.util.ArrayList;
/** /**

View file

@ -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 * Put name and value pair in map. When name already exist, add value
* to array of values. * to array of values.
*/ */

View file

@ -19,9 +19,6 @@ package helma.servlet;
import helma.framework.*; import helma.framework.*;
import helma.framework.core.Application; import helma.framework.core.Application;
import helma.main.*; import helma.main.*;
import helma.util.*;
import java.io.*;
import java.util.*;
import javax.servlet.*; import javax.servlet.*;
/** /**

View file

@ -17,12 +17,9 @@
package helma.servlet; package helma.servlet;
import helma.framework.*; import helma.framework.*;
import java.io.*;
import java.rmi.Naming; import java.rmi.Naming;
import java.rmi.RemoteException;
import java.util.Hashtable; import java.util.Hashtable;
import javax.servlet.*; import javax.servlet.*;
import javax.servlet.http.*;
/** /**
* This is the HOP servlet adapter. This class communicates with any * This is the HOP servlet adapter. This class communicates with any

View file

@ -17,10 +17,7 @@
package helma.servlet; package helma.servlet;
import helma.framework.*; import helma.framework.*;
import java.io.*;
import java.rmi.Naming; import java.rmi.Naming;
import java.rmi.RemoteException;
import java.util.*;
import javax.servlet.*; import javax.servlet.*;
/** /**

View file

@ -18,9 +18,7 @@ package helma.servlet;
import helma.framework.*; import helma.framework.*;
import helma.framework.core.Application; import helma.framework.core.Application;
import helma.util.*;
import java.io.*; import java.io.*;
import java.util.*;
import javax.servlet.*; import javax.servlet.*;
/** /**

View file

@ -16,10 +16,6 @@
package helma.util; package helma.util;
import java.awt.*;
import java.awt.image.*;
import java.io.*;
import java.text.*;
import java.util.*; import java.util.*;
/** /**

View file

@ -393,7 +393,7 @@ public final class Logger {
/** /**
* test main method * test main method
*/ */
public static void main(String[] args) throws IOException { public static void main(String[] args) {
Logger log = new Logger(".", "testlog"); Logger log = new Logger(".", "testlog");
long start = System.currentTimeMillis(); long start = System.currentTimeMillis();
@ -409,8 +409,6 @@ public final class Logger {
log.log("done: " + (System.currentTimeMillis() - start)); log.log("done: " + (System.currentTimeMillis() - start));
System.err.println(System.currentTimeMillis() - start); System.err.println(System.currentTimeMillis() - start);
log.close(); log.close();
// System.exit (0);
} }
/** /**

View file

@ -18,7 +18,6 @@ package helma.util;
import org.w3c.dom.Document; import org.w3c.dom.Document;
import org.xml.sax.InputSource; import org.xml.sax.InputSource;
import org.xml.sax.Parser;
import org.xml.sax.SAXException; import org.xml.sax.SAXException;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
@ -30,15 +29,12 @@ import java.net.URL;
import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException; import javax.xml.parsers.ParserConfigurationException;
import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;
/** /**
* *
*/ */
public class XmlUtils { public class XmlUtils {
private static DocumentBuilderFactory domBuilderFactory = null; private static DocumentBuilderFactory domBuilderFactory = null;
private static SAXParserFactory saxParserFactory = null;
/** /**
* *
@ -89,13 +85,10 @@ public class XmlUtils {
* *
* @return ... * @return ...
* *
* @throws SAXException ...
* @throws IOException ... * @throws IOException ...
* @throws ParserConfigurationException ...
*/ */
public static Document parseHtml(Object obj) public static Document parseHtml(Object obj)
throws SAXException, IOException, throws IOException {
ParserConfigurationException {
try { try {
Class.forName("org.apache.html.dom.HTMLBuilder"); Class.forName("org.apache.html.dom.HTMLBuilder");
} catch (Throwable notfound) { } catch (Throwable notfound) {