Fixed deprecation issues. (cherry picking from commit b50bfdfd00b380061c6baa3dab1d7d5c89e616a3)

This commit is contained in:
Daniel Ruthardt 2010-12-07 21:27:28 +01:00 committed by Tobi Schäfer
parent 7cafee58c4
commit 1acd176aa5
4 changed files with 9 additions and 16 deletions

View file

@ -19,6 +19,7 @@ package helma.main.launcher;
import java.io.File; import java.io.File;
import java.io.FilenameFilter; import java.io.FilenameFilter;
import java.io.IOException; import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.lang.reflect.Method; import java.lang.reflect.Method;
import java.net.URL; import java.net.URL;
import java.net.URLClassLoader; import java.net.URLClassLoader;
@ -135,10 +136,10 @@ public class Main {
* @throws MalformedURLException * @throws MalformedURLException
*/ */
public static ClassLoader createClassLoader(String installDir) public static ClassLoader createClassLoader(String installDir)
throws MalformedURLException { throws MalformedURLException, UnsupportedEncodingException {
// decode installDir in case it is URL-encoded // decode installDir in case it is URL-encoded
installDir = URLDecoder.decode(installDir); installDir = URLDecoder.decode(installDir, System.getProperty("helma.urlEncoding", "UTF-8"));
// set up the class path // set up the class path
File libdir = new File(installDir, "lib"); File libdir = new File(installDir, "lib");

View file

@ -216,15 +216,6 @@ public class HelmaSecurityManager extends SecurityManager {
public void checkMulticast(InetAddress addr) { public void checkMulticast(InetAddress addr) {
} }
/**
*
*
* @param addr ...
* @param ttl ...
*/
public void checkMulticast(InetAddress addr, byte ttl) {
}
/** /**
* *
*/ */

View file

@ -495,6 +495,7 @@ public class Transactor {
/** /**
* Kill this transaction thread. Used as last measure only. * Kill this transaction thread. Used as last measure only.
*/ */
@SuppressWarnings("deprecation")
public synchronized void kill() { public synchronized void kill() {
killed = true; killed = true;

View file

@ -44,7 +44,7 @@ public class PathWrapper extends ScriptableObject {
setParentScope(core.getScope()); setParentScope(core.getScope());
setPrototype(null); setPrototype(null);
defineProperty("length", PathWrapper.class, DONTENUM | READONLY | PERMANENT); defineProperty("length", PathWrapper.class, DONTENUM | READONLY | PERMANENT);
defineFunctionProperties(new String[] {"href", "contains"}, defineFunctionProperties(new String[] {"href", "contains"},
PathWrapper.class, DONTENUM | PERMANENT); PathWrapper.class, DONTENUM | PERMANENT);
} }
@ -127,7 +127,7 @@ public class PathWrapper extends ScriptableObject {
return path.href(null); return path.href(null);
} }
/** /**
* Checks if the given object is contained in the request path * Checks if the given object is contained in the request path
* *
@ -137,7 +137,7 @@ public class PathWrapper extends ScriptableObject {
public int contains(Object obj) { public int contains(Object obj) {
if (obj instanceof Wrapper) if (obj instanceof Wrapper)
obj = ((Wrapper) obj).unwrap(); obj = ((Wrapper) obj).unwrap();
return path.contains(obj); return path.indexOf(obj);
} }
public String getClassName() { public String getClassName() {
@ -147,7 +147,7 @@ public class PathWrapper extends ScriptableObject {
public String toString() { public String toString() {
return "PathWrapper["+path.toString()+"]"; return "PathWrapper["+path.toString()+"]";
} }
/** /**
* Return a primitive representation for this object. * Return a primitive representation for this object.
* FIXME: We always return a string representation. * FIXME: We always return a string representation.
@ -158,4 +158,4 @@ public class PathWrapper extends ScriptableObject {
public Object getDefaultValue(Class hint) { public Object getDefaultValue(Class hint) {
return toString(); return toString();
} }
} }