diff --git a/src/helma/framework/CookieTrans.java b/src/helma/framework/CookieTrans.java index bf60d715..12f2ee2e 100644 --- a/src/helma/framework/CookieTrans.java +++ b/src/helma/framework/CookieTrans.java @@ -17,7 +17,6 @@ package helma.framework; import java.io.Serializable; -import java.util.HashMap; import javax.servlet.http.Cookie; /** diff --git a/src/helma/framework/IRemoteApp.java b/src/helma/framework/IRemoteApp.java index b4ce5481..a9423f99 100644 --- a/src/helma/framework/IRemoteApp.java +++ b/src/helma/framework/IRemoteApp.java @@ -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. diff --git a/src/helma/framework/RequestBean.java b/src/helma/framework/RequestBean.java index 1b6da6b7..996b903e 100644 --- a/src/helma/framework/RequestBean.java +++ b/src/helma/framework/RequestBean.java @@ -16,9 +16,7 @@ package helma.framework; -import helma.framework.core.Application; import java.io.Serializable; -import java.util.Date; import java.util.Map; /** diff --git a/src/helma/framework/RequestTrans.java b/src/helma/framework/RequestTrans.java index c906bec1..8ca1b52e 100644 --- a/src/helma/framework/RequestTrans.java +++ b/src/helma/framework/RequestTrans.java @@ -16,7 +16,6 @@ package helma.framework; -import helma.objectmodel.*; import helma.util.Base64; import helma.util.SystemMap; import java.io.*; diff --git a/src/helma/framework/ResponseBean.java b/src/helma/framework/ResponseBean.java index 2e931ac7..b184f56d 100644 --- a/src/helma/framework/ResponseBean.java +++ b/src/helma/framework/ResponseBean.java @@ -16,7 +16,6 @@ package helma.framework; -import helma.framework.core.Application; import java.io.Serializable; import java.util.Date; import java.util.Map; diff --git a/src/helma/framework/ResponseTrans.java b/src/helma/framework/ResponseTrans.java index d505bf1b..bc7fd86e 100644 --- a/src/helma/framework/ResponseTrans.java +++ b/src/helma/framework/ResponseTrans.java @@ -17,7 +17,6 @@ package helma.framework; import helma.framework.core.Skin; -import helma.objectmodel.*; import helma.util.*; import java.io.*; import java.security.*; diff --git a/src/helma/framework/core/Application.java b/src/helma/framework/core/Application.java index 76a22bf4..4e49abb7 100644 --- a/src/helma/framework/core/Application.java +++ b/src/helma/framework/core/Application.java @@ -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 diff --git a/src/helma/framework/core/ApplicationBean.java b/src/helma/framework/core/ApplicationBean.java index 2055efdb..b1ec2bcd 100644 --- a/src/helma/framework/core/ApplicationBean.java +++ b/src/helma/framework/core/ApplicationBean.java @@ -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; diff --git a/src/helma/framework/core/RequestEvaluator.java b/src/helma/framework/core/RequestEvaluator.java index fab68f17..8ebef258 100644 --- a/src/helma/framework/core/RequestEvaluator.java +++ b/src/helma/framework/core/RequestEvaluator.java @@ -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(); } diff --git a/src/helma/framework/core/Session.java b/src/helma/framework/core/Session.java index f6c6e149..391e3c24 100644 --- a/src/helma/framework/core/Session.java +++ b/src/helma/framework/core/Session.java @@ -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.*; /** diff --git a/src/helma/framework/core/SessionBean.java b/src/helma/framework/core/SessionBean.java index 692b0f4a..1436168f 100644 --- a/src/helma/framework/core/SessionBean.java +++ b/src/helma/framework/core/SessionBean.java @@ -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 Session object and diff --git a/src/helma/framework/core/Skin.java b/src/helma/framework/core/Skin.java index 6c2db476..8c150887 100644 --- a/src/helma/framework/core/Skin.java +++ b/src/helma/framework/core/Skin.java @@ -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; @@ -438,7 +435,7 @@ public final class Skin { } if (handlerObject == null) { - // eiter because thisObject == null or the right object wasn't found + // eiter because thisObject == null or the right object wasn't found // in the object's parent path. Check if a matching macro handler // is registered with the response object (res.handlers). handlerObject = reval.res.getMacroHandlers().get(handler); @@ -494,7 +491,7 @@ public final class Skin { // check if macro wrote out to response buffer if (buffer.length() == (bufLength + preLength)) { - // function didn't write out anything itself. + // function didn't write out anything itself. // erase previously written prefix if (preLength > 0) { buffer.setLength(bufLength); @@ -653,7 +650,7 @@ public final class Skin { break; case ENCODE_URL: - buffer.append(URLEncoder.encode(text)); + buffer.append(UrlEncoded.encode(text)); break; diff --git a/src/helma/framework/core/SkinFile.java b/src/helma/framework/core/SkinFile.java index 8b681df4..d5f46125 100644 --- a/src/helma/framework/core/SkinFile.java +++ b/src/helma/framework/core/SkinFile.java @@ -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 diff --git a/src/helma/framework/core/TypeManager.java b/src/helma/framework/core/TypeManager.java index e4ca1113..25fb5a74 100644 --- a/src/helma/framework/core/TypeManager.java +++ b/src/helma/framework/core/TypeManager.java @@ -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; diff --git a/src/helma/framework/core/ZippedAppFile.java b/src/helma/framework/core/ZippedAppFile.java index a312970e..1834b66b 100644 --- a/src/helma/framework/core/ZippedAppFile.java +++ b/src/helma/framework/core/ZippedAppFile.java @@ -16,7 +16,6 @@ package helma.framework.core; -import helma.framework.*; import helma.objectmodel.db.DbMapping; import helma.scripting.*; import helma.util.SystemProperties; diff --git a/src/helma/main/Server.java b/src/helma/main/Server.java index ae66ff12..7c7964d0 100644 --- a/src/helma/main/Server.java +++ b/src/helma/main/Server.java @@ -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"); diff --git a/src/helma/main/launcher/FilteredClassLoader.java b/src/helma/main/launcher/FilteredClassLoader.java index 696382ed..6592e232 100644 --- a/src/helma/main/launcher/FilteredClassLoader.java +++ b/src/helma/main/launcher/FilteredClassLoader.java @@ -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. diff --git a/src/helma/main/launcher/Main.java b/src/helma/main/launcher/Main.java index 24a2ec95..f669339d 100644 --- a/src/helma/main/launcher/Main.java +++ b/src/helma/main/launcher/Main.java @@ -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; /** diff --git a/src/helma/servlet/AbstractServletClient.java b/src/helma/servlet/AbstractServletClient.java index bbcc6ae2..3853c4e8 100644 --- a/src/helma/servlet/AbstractServletClient.java +++ b/src/helma/servlet/AbstractServletClient.java @@ -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. */ diff --git a/src/helma/servlet/EmbeddedServletClient.java b/src/helma/servlet/EmbeddedServletClient.java index 7d9f16d4..b03c88d5 100644 --- a/src/helma/servlet/EmbeddedServletClient.java +++ b/src/helma/servlet/EmbeddedServletClient.java @@ -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.*; /** diff --git a/src/helma/servlet/MultiServletClient.java b/src/helma/servlet/MultiServletClient.java index 29a98f0a..d2752c6b 100644 --- a/src/helma/servlet/MultiServletClient.java +++ b/src/helma/servlet/MultiServletClient.java @@ -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 diff --git a/src/helma/servlet/ServletClient.java b/src/helma/servlet/ServletClient.java index 45bab3fd..1cccb452 100644 --- a/src/helma/servlet/ServletClient.java +++ b/src/helma/servlet/ServletClient.java @@ -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.*; /** diff --git a/src/helma/servlet/StandaloneServletClient.java b/src/helma/servlet/StandaloneServletClient.java index 53b1c869..bbde3ac0 100644 --- a/src/helma/servlet/StandaloneServletClient.java +++ b/src/helma/servlet/StandaloneServletClient.java @@ -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.*; /** diff --git a/src/helma/util/HtmlEncoder.java b/src/helma/util/HtmlEncoder.java index 392e75f9..920edf32 100644 --- a/src/helma/util/HtmlEncoder.java +++ b/src/helma/util/HtmlEncoder.java @@ -16,10 +16,6 @@ package helma.util; -import java.awt.*; -import java.awt.image.*; -import java.io.*; -import java.text.*; import java.util.*; /** diff --git a/src/helma/util/Logger.java b/src/helma/util/Logger.java index 40a26add..a4a7d0ca 100644 --- a/src/helma/util/Logger.java +++ b/src/helma/util/Logger.java @@ -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); } /** diff --git a/src/helma/util/XmlUtils.java b/src/helma/util/XmlUtils.java index df05f497..055d5dfa 100644 --- a/src/helma/util/XmlUtils.java +++ b/src/helma/util/XmlUtils.java @@ -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) {