Go back to Java 1.4 compatibility. The few generics uses aren't worth it to require Java 1.5.
This commit is contained in:
parent
e827d0beb4
commit
a635964fc8
5 changed files with 13 additions and 13 deletions
|
@ -106,8 +106,8 @@
|
||||||
<replace file="${build.work}/src/helma/main/Server.java"
|
<replace file="${build.work}/src/helma/main/Server.java"
|
||||||
token="__builddate__" value="${TODAY}"/>
|
token="__builddate__" value="${TODAY}"/>
|
||||||
<javac srcdir="${build.work}/src"
|
<javac srcdir="${build.work}/src"
|
||||||
source="1.5"
|
source="1.4"
|
||||||
target="1.5"
|
target="1.4"
|
||||||
destdir="${build.classes}"
|
destdir="${build.classes}"
|
||||||
debug="${debug}"
|
debug="${debug}"
|
||||||
deprecation="${deprecation}"
|
deprecation="${deprecation}"
|
||||||
|
|
|
@ -105,7 +105,7 @@ public final class Application implements Runnable {
|
||||||
ThreadGroup threadgroup;
|
ThreadGroup threadgroup;
|
||||||
|
|
||||||
// threadlocal variable for the current RequestEvaluator
|
// threadlocal variable for the current RequestEvaluator
|
||||||
ThreadLocal<RequestEvaluator> currentEvaluator = new ThreadLocal<RequestEvaluator>();
|
ThreadLocal currentEvaluator = new ThreadLocal();
|
||||||
|
|
||||||
// Map of requesttrans -> active requestevaluators
|
// Map of requesttrans -> active requestevaluators
|
||||||
Hashtable activeRequests;
|
Hashtable activeRequests;
|
||||||
|
|
|
@ -350,7 +350,7 @@ public class ApplicationManager implements XmlRpcHandler {
|
||||||
ignoreDirs = conf.getProperty("ignore");
|
ignoreDirs = conf.getProperty("ignore");
|
||||||
|
|
||||||
// read and configure app repositories
|
// read and configure app repositories
|
||||||
ArrayList<Repository> repositoryList = new ArrayList<Repository>();
|
ArrayList repositoryList = new ArrayList();
|
||||||
Class[] parameters = { String.class };
|
Class[] parameters = { String.class };
|
||||||
for (int i = 0; true; i++) {
|
for (int i = 0; true; i++) {
|
||||||
String repositoryArgs = conf.getProperty("repository." + i);
|
String repositoryArgs = conf.getProperty("repository." + i);
|
||||||
|
@ -373,7 +373,7 @@ public class ApplicationManager implements XmlRpcHandler {
|
||||||
try {
|
try {
|
||||||
Repository newRepository = (Repository) Class.forName(repositoryImpl)
|
Repository newRepository = (Repository) Class.forName(repositoryImpl)
|
||||||
.getConstructor(parameters)
|
.getConstructor(parameters)
|
||||||
.newInstance(repositoryArgs);
|
.newInstance(new Object[] {repositoryArgs});
|
||||||
repositoryList.add(newRepository);
|
repositoryList.add(newRepository);
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
getLogger().error("Adding repository " + repositoryArgs + " failed. " +
|
getLogger().error("Adding repository " + repositoryArgs + " failed. " +
|
||||||
|
@ -397,7 +397,7 @@ public class ApplicationManager implements XmlRpcHandler {
|
||||||
new File(server.getAppsHome(), appName)));
|
new File(server.getAppsHome(), appName)));
|
||||||
}
|
}
|
||||||
repositories = new Repository[repositoryList.size()];
|
repositories = new Repository[repositoryList.size()];
|
||||||
repositories = repositoryList.toArray(repositories);
|
repositories = (Repository[]) repositoryList.toArray(repositories);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -66,7 +66,7 @@ public class Transactor {
|
||||||
// the thread we're associated with
|
// the thread we're associated with
|
||||||
private Thread thread;
|
private Thread thread;
|
||||||
|
|
||||||
private static final ThreadLocal <Transactor> txtor = new ThreadLocal <Transactor> ();
|
private static final ThreadLocal txtor = new ThreadLocal();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new Transactor object.
|
* Creates a new Transactor object.
|
||||||
|
@ -92,7 +92,7 @@ public class Transactor {
|
||||||
* @return the transactor associated with the current thread
|
* @return the transactor associated with the current thread
|
||||||
*/
|
*/
|
||||||
public static Transactor getInstance() {
|
public static Transactor getInstance() {
|
||||||
return txtor.get();
|
return (Transactor) txtor.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -101,7 +101,7 @@ public class Transactor {
|
||||||
* @throws IllegalStateException if no transactor is associated with the current thread
|
* @throws IllegalStateException if no transactor is associated with the current thread
|
||||||
*/
|
*/
|
||||||
public static Transactor getInstanceOrFail() throws IllegalStateException {
|
public static Transactor getInstanceOrFail() throws IllegalStateException {
|
||||||
Transactor tx = txtor.get();
|
Transactor tx = (Transactor) txtor.get();
|
||||||
if (tx == null)
|
if (tx == null)
|
||||||
throw new IllegalStateException("Operation requires a Transactor, " +
|
throw new IllegalStateException("Operation requires a Transactor, " +
|
||||||
"but current thread does not have one.");
|
"but current thread does not have one.");
|
||||||
|
@ -114,7 +114,7 @@ public class Transactor {
|
||||||
* @return the transactor associated with the current thread
|
* @return the transactor associated with the current thread
|
||||||
*/
|
*/
|
||||||
public static Transactor getInstance(NodeManager nmgr) {
|
public static Transactor getInstance(NodeManager nmgr) {
|
||||||
Transactor t = txtor.get();
|
Transactor t = (Transactor) txtor.get();
|
||||||
if (t == null) {
|
if (t == null) {
|
||||||
t = new Transactor(nmgr);
|
t = new Transactor(nmgr);
|
||||||
txtor.set(t);
|
txtor.set(t);
|
||||||
|
|
|
@ -78,7 +78,7 @@ public final class StandaloneServletClient extends AbstractServletClient {
|
||||||
}
|
}
|
||||||
|
|
||||||
Class[] parameters = { String.class };
|
Class[] parameters = { String.class };
|
||||||
ArrayList<Repository> repositoryList = new ArrayList<Repository>();
|
ArrayList repositoryList = new ArrayList();
|
||||||
|
|
||||||
for (int i = 0; true; i++) {
|
for (int i = 0; true; i++) {
|
||||||
String repositoryArgs = init.getInitParameter("repository." + i);
|
String repositoryArgs = init.getInitParameter("repository." + i);
|
||||||
|
@ -100,7 +100,7 @@ public final class StandaloneServletClient extends AbstractServletClient {
|
||||||
try {
|
try {
|
||||||
Repository newRepository = (Repository) Class.forName(repositoryImpl)
|
Repository newRepository = (Repository) Class.forName(repositoryImpl)
|
||||||
.getConstructor(parameters)
|
.getConstructor(parameters)
|
||||||
.newInstance(repositoryArgs);
|
.newInstance(new Object[] {repositoryArgs});
|
||||||
repositoryList.add(newRepository);
|
repositoryList.add(newRepository);
|
||||||
log("adding repository: " + repositoryArgs);
|
log("adding repository: " + repositoryArgs);
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
|
@ -123,7 +123,7 @@ public final class StandaloneServletClient extends AbstractServletClient {
|
||||||
}
|
}
|
||||||
|
|
||||||
repositories = new Repository[repositoryList.size()];
|
repositories = new Repository[repositoryList.size()];
|
||||||
repositories = repositoryList.toArray(repositories);
|
repositories = (Repository[]) repositoryList.toArray(repositories);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue