Fixed deprecation issues. (cherry picking from commit b50bfdfd00b380061c6baa3dab1d7d5c89e616a3)
This commit is contained in:
parent
7cafee58c4
commit
1acd176aa5
4 changed files with 9 additions and 16 deletions
|
@ -19,6 +19,7 @@ package helma.main.launcher;
|
|||
import java.io.File;
|
||||
import java.io.FilenameFilter;
|
||||
import java.io.IOException;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.lang.reflect.Method;
|
||||
import java.net.URL;
|
||||
import java.net.URLClassLoader;
|
||||
|
@ -135,10 +136,10 @@ public class Main {
|
|||
* @throws MalformedURLException
|
||||
*/
|
||||
public static ClassLoader createClassLoader(String installDir)
|
||||
throws MalformedURLException {
|
||||
throws MalformedURLException, UnsupportedEncodingException {
|
||||
|
||||
// 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
|
||||
File libdir = new File(installDir, "lib");
|
||||
|
|
|
@ -216,15 +216,6 @@ public class HelmaSecurityManager extends SecurityManager {
|
|||
public void checkMulticast(InetAddress addr) {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @param addr ...
|
||||
* @param ttl ...
|
||||
*/
|
||||
public void checkMulticast(InetAddress addr, byte ttl) {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
|
|
@ -495,6 +495,7 @@ public class Transactor {
|
|||
/**
|
||||
* Kill this transaction thread. Used as last measure only.
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public synchronized void kill() {
|
||||
|
||||
killed = true;
|
||||
|
|
|
@ -44,7 +44,7 @@ public class PathWrapper extends ScriptableObject {
|
|||
setParentScope(core.getScope());
|
||||
setPrototype(null);
|
||||
defineProperty("length", PathWrapper.class, DONTENUM | READONLY | PERMANENT);
|
||||
defineFunctionProperties(new String[] {"href", "contains"},
|
||||
defineFunctionProperties(new String[] {"href", "contains"},
|
||||
PathWrapper.class, DONTENUM | PERMANENT);
|
||||
}
|
||||
|
||||
|
@ -127,7 +127,7 @@ public class PathWrapper extends ScriptableObject {
|
|||
|
||||
return path.href(null);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 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) {
|
||||
if (obj instanceof Wrapper)
|
||||
obj = ((Wrapper) obj).unwrap();
|
||||
return path.contains(obj);
|
||||
return path.indexOf(obj);
|
||||
}
|
||||
|
||||
public String getClassName() {
|
||||
|
@ -147,7 +147,7 @@ public class PathWrapper extends ScriptableObject {
|
|||
public String toString() {
|
||||
return "PathWrapper["+path.toString()+"]";
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return a primitive representation for this object.
|
||||
* FIXME: We always return a string representation.
|
||||
|
@ -158,4 +158,4 @@ public class PathWrapper extends ScriptableObject {
|
|||
public Object getDefaultValue(Class hint) {
|
||||
return toString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue