diff --git a/build.properties b/build.properties
index 5075bf4fc..0583b76a5 100644
--- a/build.properties
+++ b/build.properties
@@ -3,7 +3,7 @@ javacSource=1.5
javacTarget=1.5
# Release Configuration
-releaseVersion=0.563
+releaseVersion=0.564
stdReleaseFile=yacy_v${releaseVersion}_${DSTAMP}_${releaseNr}.tar.gz
embReleaseFile=yacy_emb_v${releaseVersion}_${DSTAMP}_${releaseNr}.tar.gz
proReleaseFile=yacy_pro_v${releaseVersion}_${DSTAMP}_${releaseNr}.tar.gz
diff --git a/htroot/ViewProfile.html b/htroot/ViewProfile.html
index de84fce21..4cb64e56a 100644
--- a/htroot/ViewProfile.html
+++ b/htroot/ViewProfile.html
@@ -3,6 +3,7 @@
YaCy '#[clientname]#': Remote Peer Profile
+
#%env/templates/metas.template%#
@@ -25,7 +26,7 @@
The peer #[peername]# is not online.
::
This is the Profile of #[peername]#:
-
+
#(/success)#
+ View this profile as rdf:foaf or
+ vCard
#(display)#
#%env/templates/simplefooter.template%#
::
diff --git a/source/de/anomic/data/bookmarksDB.java b/source/de/anomic/data/bookmarksDB.java
index 26a7f272d..0903c7c72 100644
--- a/source/de/anomic/data/bookmarksDB.java
+++ b/source/de/anomic/data/bookmarksDB.java
@@ -74,7 +74,6 @@ import org.xml.sax.SAXException;
import de.anomic.htmlFilter.htmlFilterContentScraper;
import de.anomic.htmlFilter.htmlFilterWriter;
-import de.anomic.plasma.plasmaCondenser;
import de.anomic.kelondro.kelondroCloneableIterator;
import de.anomic.kelondro.kelondroDyn;
import de.anomic.kelondro.kelondroException;
@@ -82,6 +81,7 @@ import de.anomic.kelondro.kelondroMapObjects;
import de.anomic.kelondro.kelondroNaturalOrder;
import de.anomic.kelondro.kelondroObjects;
import de.anomic.kelondro.kelondroObjectsMapEntry;
+import de.anomic.plasma.plasmaCondenser;
import de.anomic.server.serverDate;
import de.anomic.server.serverFileUtils;
import de.anomic.server.logging.serverLog;
@@ -722,15 +722,15 @@ public class bookmarksDB {
public static final String TAG_NAME="tagName";
private String tagHash;
private Map mem;
- private Set urlHashes;
+ private Set urlHashes;
public Tag(String hash, Map map){
tagHash=hash;
mem=map;
if(mem.containsKey(URL_HASHES))
- urlHashes=listManager.string2set((String) mem.get(URL_HASHES));
+ urlHashes = listManager.string2set((String) mem.get(URL_HASHES));
else
- urlHashes=new HashSet();
+ urlHashes = new HashSet();
}
public Tag(String name, HashSet entries){
tagHash=tagHash(name);
@@ -776,7 +776,7 @@ public class bookmarksDB {
}
return "notagname";
}
- public Set getUrlHashes(){
+ public Set getUrlHashes(){
return urlHashes;
}
public boolean hasPublicItems(){
diff --git a/source/de/anomic/data/wiki/knwikiParser.java b/source/de/anomic/data/wiki/knwikiParser.java
index 6a4cbd7ba..b2674b4b1 100644
--- a/source/de/anomic/data/wiki/knwikiParser.java
+++ b/source/de/anomic/data/wiki/knwikiParser.java
@@ -154,10 +154,10 @@ public class knwikiParser implements wikiParser {
new DefinitionListToken(),
new TableToken()
};
- ArrayList r = new ArrayList();
- for (int i=0, k, j; i r = new ArrayList();
+ for (int i = 0, k, j; i < tokens.length; i++)
if (tokens[i].getBlockElementNames() != null)
- for (j=0; j 1) {
r.add(tokens[i].getBlockElementNames()[j].substring(0, k));
@@ -265,7 +265,7 @@ public class knwikiParser implements wikiParser {
int startLen = escapeBegin.length();
int endLen = escapeEnd.length();
- ArrayList r = new ArrayList();
+ ArrayList r = new ArrayList();
boolean escaped = text.startsWith(escapeBegin);
if (escaped) r.add(new Text("", false, true));
int i, j = 0;
diff --git a/source/de/anomic/data/wiki/tokens/LinkToken.java b/source/de/anomic/data/wiki/tokens/LinkToken.java
index 75b40cf08..8df7397c7 100644
--- a/source/de/anomic/data/wiki/tokens/LinkToken.java
+++ b/source/de/anomic/data/wiki/tokens/LinkToken.java
@@ -168,15 +168,15 @@ public class LinkToken extends AbstractToken {
private Link[] getLinksFromBookmarkTag(String tagName) {
Tag tag = this.sb.bookmarksDB.getTag(bookmarksDB.tagHash(tagName));
if (tag == null) return null;
- ArrayList r = new ArrayList();
- Iterator it = tag.getUrlHashes().iterator();
+ ArrayList r = new ArrayList();
+ Iterator it = tag.getUrlHashes().iterator();
String hash;
Bookmark bm;
while (it.hasNext())
- if ((hash = (String)it.next()) != null)
+ if ((hash = it.next()) != null)
if ((bm = this.sb.bookmarksDB.getBookmark(hash)) != null)
r.add(new Link(bm.getUrl(), bm.getTitle(), bm.getDescription()));
- return (Link[])r.toArray(new Link[r.size()]);
+ return (Link[]) r.toArray(new Link[r.size()]);
}
private static class Link {
diff --git a/source/de/anomic/data/wiki/tokens/ListToken.java b/source/de/anomic/data/wiki/tokens/ListToken.java
index 4159071a0..274665501 100644
--- a/source/de/anomic/data/wiki/tokens/ListToken.java
+++ b/source/de/anomic/data/wiki/tokens/ListToken.java
@@ -68,7 +68,7 @@ public class ListToken extends AbstractToken {
this.listElement = "li";
this.recursion = true;
this.pattern = new Pattern[] { Pattern.compile("^[" + firstChar + "]([^\n]|\n[" + firstChar + "])*", Pattern.MULTILINE) };
- ArrayList r = new ArrayList();
+ ArrayList r = new ArrayList();
if (this.listBlockElement != null) {
if (this.recursion) r.add(this.listBlockElement);
if (this.listElement != null) r.add(this.listElement);
@@ -82,7 +82,7 @@ public class ListToken extends AbstractToken {
this.listElement = listElement;
this.recursion = true;
this.pattern = new Pattern[] { Pattern.compile("^[" + firstChar + "]([^\n]|\n[" + firstChar + "])*", Pattern.MULTILINE) };
- ArrayList r = new ArrayList();
+ ArrayList r = new ArrayList();
if (this.listBlockElement != null) {
if (this.recursion) r.add(this.listBlockElement);
if (this.listElement != null) r.add(this.listElement);
@@ -96,7 +96,7 @@ public class ListToken extends AbstractToken {
this.listElement = listElement;
this.recursion = recursion;
this.pattern = new Pattern[] { Pattern.compile("^[" + firstChar + "]([^\n]|\n[" + firstChar + "])*", Pattern.MULTILINE) };
- ArrayList r = new ArrayList();
+ ArrayList r = new ArrayList();
if (this.listBlockElement != null) {
if (this.recursion) r.add(this.listBlockElement);
if (this.listElement != null) r.add(this.listElement);
diff --git a/source/de/anomic/data/wiki/tokens/SimpleToken.java b/source/de/anomic/data/wiki/tokens/SimpleToken.java
index bd1a7a4c5..faa2a0d60 100644
--- a/source/de/anomic/data/wiki/tokens/SimpleToken.java
+++ b/source/de/anomic/data/wiki/tokens/SimpleToken.java
@@ -66,13 +66,13 @@ public class SimpleToken extends AbstractToken {
this.definitionList = definitionList;
int i;
if (isBlockElements) {
- ArrayList r = new ArrayList();
+ ArrayList r = new ArrayList();
int j;
- for (i=0; i */ ps = new HashMap();
+ private static final HashMap ps = new HashMap();
static {
Arrays.sort(tps);
String[] array;
diff --git a/source/de/anomic/htmlFilter/htmlFilterAbstractScraper.java b/source/de/anomic/htmlFilter/htmlFilterAbstractScraper.java
index efb3fcfb6..642c290e6 100644
--- a/source/de/anomic/htmlFilter/htmlFilterAbstractScraper.java
+++ b/source/de/anomic/htmlFilter/htmlFilterAbstractScraper.java
@@ -38,11 +38,11 @@ public abstract class htmlFilterAbstractScraper implements htmlFilterScraper {
public static final char rb = '>';
public static final char sl = '/';
- private TreeSet tags0;
- private TreeSet tags1;
+ private TreeSet tags0;
+ private TreeSet tags1;
// define a translation table for html character codings
- private static HashMap trans = new HashMap(300);
+ private static HashMap trans = new HashMap(300);
static {
trans.put(""", "\""); //Anführungszeichen oben
trans.put("&", "&"); //Ampersand-Zeichen, kaufmännisches Und
@@ -290,7 +290,7 @@ public abstract class htmlFilterAbstractScraper implements htmlFilterScraper {
}
- public htmlFilterAbstractScraper(TreeSet tags0, TreeSet tags1) {
+ public htmlFilterAbstractScraper(TreeSet tags0, TreeSet tags1) {
this.tags0 = tags0;
this.tags1 = tags1;
}
diff --git a/source/de/anomic/htmlFilter/htmlFilterAbstractTransformer.java b/source/de/anomic/htmlFilter/htmlFilterAbstractTransformer.java
index fcb4cb5f5..d9fb3afd2 100644
--- a/source/de/anomic/htmlFilter/htmlFilterAbstractTransformer.java
+++ b/source/de/anomic/htmlFilter/htmlFilterAbstractTransformer.java
@@ -45,20 +45,20 @@ import java.util.TreeSet;
public abstract class htmlFilterAbstractTransformer implements htmlFilterTransformer {
- private TreeSet tags0;
- private TreeSet tags1;
+ private TreeSet tags0;
+ private TreeSet tags1;
- public htmlFilterAbstractTransformer(TreeSet tags0, TreeSet tags1) {
- this.tags0 = tags0;
- this.tags1 = tags1;
+ public htmlFilterAbstractTransformer(TreeSet tags0, TreeSet tags1) {
+ this.tags0 = tags0;
+ this.tags1 = tags1;
}
public boolean isTag0(String tag) {
- return tags0.contains(tag);
+ return tags0.contains(tag);
}
public boolean isTag1(String tag) {
- return tags1.contains(tag);
+ return tags1.contains(tag);
}
//the 'missing' method that shall be implemented:
@@ -71,11 +71,11 @@ public abstract class htmlFilterAbstractTransformer implements htmlFilterTransfo
// the other methods must take into account to construct the return value correctly
public char[] transformTag0(String tagname, Properties tagopts, char quotechar) {
- return htmlFilterWriter.genTag0(tagname, tagopts, quotechar);
+ return htmlFilterWriter.genTag0(tagname, tagopts, quotechar);
}
public char[] transformTag1(String tagname, Properties tagopts, char[] text, char quotechar) {
- return htmlFilterWriter.genTag1(tagname, tagopts, text, quotechar);
+ return htmlFilterWriter.genTag1(tagname, tagopts, text, quotechar);
}
public void close() {
diff --git a/source/de/anomic/htmlFilter/htmlFilterContentTransformer.java b/source/de/anomic/htmlFilter/htmlFilterContentTransformer.java
index 288c1b460..011bbdd92 100644
--- a/source/de/anomic/htmlFilter/htmlFilterContentTransformer.java
+++ b/source/de/anomic/htmlFilter/htmlFilterContentTransformer.java
@@ -59,8 +59,8 @@ import de.anomic.server.serverCharBuffer;
public class htmlFilterContentTransformer extends htmlFilterAbstractTransformer implements htmlFilterTransformer {
// statics: for initialisation of the HTMLFilterAbstractTransformer
- private static TreeSet linkTags0;
- private static TreeSet linkTags1;
+ private static TreeSet linkTags0;
+ private static TreeSet linkTags1;
private static final Collator insensitiveCollator = Collator.getInstance(Locale.US);
static {
@@ -69,15 +69,15 @@ public class htmlFilterContentTransformer extends htmlFilterAbstractTransformer
}
static {
- linkTags0 = new TreeSet(insensitiveCollator);
+ linkTags0 = new TreeSet(insensitiveCollator);
linkTags0.add("img");
linkTags0.add("input");
- linkTags1 = new TreeSet(insensitiveCollator);
+ linkTags1 = new TreeSet(insensitiveCollator);
linkTags1.add("a");
}
- private ArrayList bluelist = null;
+ private ArrayList bluelist = null;
public htmlFilterContentTransformer() {
super(linkTags0, linkTags1);
@@ -85,8 +85,8 @@ public class htmlFilterContentTransformer extends htmlFilterAbstractTransformer
public void init(String initarg) {
if (bluelist == null) {
- // here, the initarg is used to load a list of bluelisted words
- bluelist = new ArrayList();
+ // here, the init arg is used to load a list of blue-listed words
+ bluelist = new ArrayList();
File f = new File(initarg);
if (f.canRead()) {
try {
@@ -127,8 +127,8 @@ public class htmlFilterContentTransformer extends htmlFilterAbstractTransformer
return false;
}
- public ArrayList getStrings(byte[] text){
- ArrayList result=new ArrayList();
+ public ArrayList getStrings(byte[] text){
+ ArrayList result = new ArrayList();
serverByteBuffer sbb = new serverByteBuffer(text);
serverByteBuffer[] sbbs = httpTemplate.splitQuotations(sbb);
diff --git a/source/de/anomic/htmlFilter/htmlFilterImageEntry.java b/source/de/anomic/htmlFilter/htmlFilterImageEntry.java
index abbb697e5..b65aa7dd2 100644
--- a/source/de/anomic/htmlFilter/htmlFilterImageEntry.java
+++ b/source/de/anomic/htmlFilter/htmlFilterImageEntry.java
@@ -42,7 +42,7 @@ package de.anomic.htmlFilter;
import de.anomic.yacy.yacyURL;
-public class htmlFilterImageEntry implements Comparable {
+public class htmlFilterImageEntry implements Comparable {
private yacyURL url;
private String alt;
@@ -86,13 +86,12 @@ public class htmlFilterImageEntry implements Comparable {
return 0xFFFF0000 | (url.hashCode() & 0xFFFF);
}
- public int compareTo(Object h) {
+ public int compareTo(htmlFilterImageEntry h) {
// this is needed if this object is stored in a TreeSet
// this method uses the image-size ordering from the hashCode method
// assuming that hashCode would return a 'perfect hash' this method would
// create a total ordering on images with respect on the image size
assert (url != null);
- assert (h instanceof htmlFilterImageEntry);
if (this.url.toNormalform(true, true).equals(((htmlFilterImageEntry) h).url.toNormalform(true, true))) return 0;
int thc = this.hashCode();
int ohc = ((htmlFilterImageEntry) h).hashCode();
@@ -101,8 +100,7 @@ public class htmlFilterImageEntry implements Comparable {
return this.url.toString().compareTo(((htmlFilterImageEntry) h).url.toString());
}
- public boolean equals(Object o) {
- if (!(o instanceof htmlFilterImageEntry)) return false;
+ public boolean equals(htmlFilterImageEntry o) {
return compareTo(o) == 0;
}
}
diff --git a/source/de/anomic/htmlFilter/htmlFilterWriter.java b/source/de/anomic/htmlFilter/htmlFilterWriter.java
index d00dc7673..a343738e0 100644
--- a/source/de/anomic/htmlFilter/htmlFilterWriter.java
+++ b/source/de/anomic/htmlFilter/htmlFilterWriter.java
@@ -167,7 +167,7 @@ public final class htmlFilterWriter extends Writer {
// a helper method for pretty-printing of properties for html tags
public static char[] genOpts(Properties prop, char quotechar) {
- Enumeration e = prop.propertyNames();
+ Enumeration> e = prop.propertyNames();
serverCharBuffer bb = new serverCharBuffer(prop.size() * 40);
String key;
while (e.hasMoreElements()) {
diff --git a/source/de/anomic/http/httpHeader.java b/source/de/anomic/http/httpHeader.java
index f4ee874f8..0aa929405 100644
--- a/source/de/anomic/http/httpHeader.java
+++ b/source/de/anomic/http/httpHeader.java
@@ -721,9 +721,9 @@ public final class httpHeader extends TreeMap implements Map implements Map {
+ private String k;
+ private Object v;
+ Entry(String k, Object v) {
+ this.k = k;
+ this.v = v;
+ }
+ public String getKey() {
+ return k;
+ }
+ public Object getValue() {
+ return v;
+ }
+ public Object setValue(Object v) {
+ Object r = this.v;
+ this.v = v;
+ return r;
+ }
}
/**
@@ -895,10 +906,10 @@ public final class httpHeader extends TreeMap implements Map> it = this.entrySet().iterator();
while(it.hasNext())
{
- java.util.Map.Entry e = (java.util.Map.Entry) it.next();
+ Map.Entry e = it.next();
//System.out.println(""+e.getKey()+" : "+e.getValue());
if(e.getKey().equals("Cookie"))
{
diff --git a/source/de/anomic/http/httpRemoteProxyConfig.java b/source/de/anomic/http/httpRemoteProxyConfig.java
index 3530e2c72..6f6967c7c 100644
--- a/source/de/anomic/http/httpRemoteProxyConfig.java
+++ b/source/de/anomic/http/httpRemoteProxyConfig.java
@@ -70,8 +70,8 @@ public final class httpRemoteProxyConfig {
private String remoteProxyNoProxy = "";
private String[] remoteProxyNoProxyPatterns = null;
- public final HashSet remoteProxyAllowProxySet = new HashSet();
- public final HashSet remoteProxyDisallowProxySet = new HashSet();
+ public final HashSet remoteProxyAllowProxySet = new HashSet();
+ public final HashSet remoteProxyDisallowProxySet = new HashSet();
public boolean useProxy() {
return this.remoteProxyUse;
diff --git a/source/de/anomic/http/httpTemplate.java b/source/de/anomic/http/httpTemplate.java
index ad3c3999e..118afb30f 100644
--- a/source/de/anomic/http/httpTemplate.java
+++ b/source/de/anomic/http/httpTemplate.java
@@ -158,14 +158,14 @@ public final class httpTemplate {
};
public static serverByteBuffer[] splitQuotations(serverByteBuffer text) {
- List l = splitQuotation(text, 0);
+ List l = splitQuotation(text, 0);
serverByteBuffer[] sbbs = new serverByteBuffer[l.size()];
- for (int i = 0; i < l.size(); i++) sbbs[i] = (serverByteBuffer) l.get(i);
+ for (int i = 0; i < l.size(); i++) sbbs[i] = l.get(i);
return sbbs;
}
- public static List splitQuotation(serverByteBuffer text, int qoff) {
- ArrayList l = new ArrayList();
+ public static List splitQuotation(serverByteBuffer text, int qoff) {
+ ArrayList l = new ArrayList();
if (qoff >= meta_quotation.length) {
if (text.length() > 0) l.add(text);
return l;
@@ -229,14 +229,14 @@ public final class httpTemplate {
return false;
}
- public static void writeTemplate(InputStream in, OutputStream out, Hashtable pattern, byte[] dflt) throws IOException {
+ public static void writeTemplate(InputStream in, OutputStream out, Hashtable pattern, byte[] dflt) throws IOException {
writeTemplate(in, out, pattern, dflt, new byte[0]);
}
/**
* Reads a input stream, and writes the data with replaced templates on a output stream
*/
- public static byte[] writeTemplate(InputStream in, OutputStream out, Hashtable pattern, byte[] dflt, byte[] prefix) throws IOException {
+ public static byte[] writeTemplate(InputStream in, OutputStream out, Hashtable pattern, byte[] dflt, byte[] prefix) throws IOException {
PushbackInputStream pis = new PushbackInputStream(in, 100);
ByteArrayOutputStream keyStream;
byte[] key;
@@ -487,7 +487,7 @@ public final class httpTemplate {
return structure.getBytes();
}
- public static byte[] replacePattern(String key, Hashtable pattern, byte dflt[]) {
+ public static byte[] replacePattern(String key, Hashtable pattern, byte dflt[]) {
byte[] replacement;
Object value;
if (pattern.containsKey(key)) {
@@ -515,8 +515,8 @@ public final class httpTemplate {
// arg1 = test input; arg2 = replacement for pattern 'test'; arg3 = default replacement
try {
InputStream i = new ByteArrayInputStream(args[0].getBytes());
- Hashtable h = new Hashtable();
- h.put("test", args[1].getBytes());
+ Hashtable h = new Hashtable();
+ h.put("test", args[1]);
writeTemplate(new PushbackInputStream(i, 100), System.out, h, args[2].getBytes());
System.out.flush();
} catch (Exception e) {
@@ -526,10 +526,10 @@ public final class httpTemplate {
/*
* loads all Files from path into a filename->content HashMap
*/
- public static HashMap loadTemplates(File path) {
+ public static HashMap loadTemplates(File path) {
// reads all templates from a path
// we use only the folder from the given file path
- HashMap result = new HashMap();
+ HashMap result = new HashMap();
if (path == null) return result;
if (!(path.isDirectory())) path = path.getParentFile();
if ((path == null) || (!(path.isDirectory()))) return result;
diff --git a/source/de/anomic/http/httpd.java b/source/de/anomic/http/httpd.java
index c73c9b515..ebd028f88 100644
--- a/source/de/anomic/http/httpd.java
+++ b/source/de/anomic/http/httpd.java
@@ -107,7 +107,7 @@ public final class httpd implements serverHandler {
*/
//TODO: Load this from a file
- private static final HashSet disallowZippedContentEncoding = new HashSet(Arrays.asList(new String[]{
+ private static final HashSet disallowZippedContentEncoding = new HashSet(Arrays.asList(new String[]{
".gz", ".tgz", ".jpg", ".jpeg", ".gif", ".zip", ".rar", ".bz2", ".lha", ".jar", ".rpm", ".arc", ".arj", ".wmv", ".png", ".ico", ".bmp"
}));
@@ -121,8 +121,8 @@ public final class httpd implements serverHandler {
private static String virtualHost = null;
public static boolean keepAliveSupport = false;
- private static HashMap YaCyHopAccessRequester = new HashMap();
- private static HashMap YaCyHopAccessTargets = new HashMap();
+ private static HashMap YaCyHopAccessRequester = new HashMap();
+ private static HashMap YaCyHopAccessTargets = new HashMap();
// class objects
private serverCore.Session session; // holds the session object of the calling class
@@ -381,8 +381,8 @@ public final class httpd implements serverHandler {
return true;
}
- private static long lastAccessDelta(HashMap accessTable, String domain) {
- Long lastAccess = (Long) accessTable.get(domain);
+ private static long lastAccessDelta(HashMap accessTable, String domain) {
+ Long lastAccess = accessTable.get(domain);
if (lastAccess == null) return Long.MAX_VALUE; // never accessed
return System.currentTimeMillis() - lastAccess.longValue();
}
@@ -1187,9 +1187,9 @@ public final class httpd implements serverHandler {
tp.put("errorMessageType_file", (detailedErrorMsgFile == null) ? "" : detailedErrorMsgFile.toString());
if ((detailedErrorMsgValues != null) && (detailedErrorMsgValues.size() > 0)) {
// rewriting the value-names and add the proper name prefix:
- Iterator nameIter = detailedErrorMsgValues.keySet().iterator();
+ Iterator nameIter = detailedErrorMsgValues.keySet().iterator();
while (nameIter.hasNext()) {
- String name = (String) nameIter.next();
+ String name = nameIter.next();
tp.put("errorMessageType_" + name, detailedErrorMsgValues.get(name));
}
}
@@ -1405,12 +1405,11 @@ public final class httpd implements serverHandler {
httpHeader outgoingHeader=requestProperties.getOutgoingHeader();
if (outgoingHeader!=null)
{*/
- Iterator it=header.getCookies();
- while(it.hasNext())
- {
+ Iterator it = header.getCookies();
+ while(it.hasNext()) {
//Append user properties to the main String
//TODO: Should we check for user properites. What if they intersect properties that are already in header?
- java.util.Map.Entry e=(java.util.Map.Entry)it.next();
+ httpHeader.Entry e = it.next();
headerStringBuffer.append(e.getKey()).append(": ").append(e.getValue()).append("\r\n");
}
@@ -1419,13 +1418,13 @@ public final class httpd implements serverHandler {
}*/
// write header
- Iterator i = header.keySet().iterator();
+ Iterator i = header.keySet().iterator();
String key;
char tag;
int count;
//System.out.println("vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv");
while (i.hasNext()) {
- key = (String) i.next();
+ key = i.next();
tag = key.charAt(0);
if ((tag != '*') && (tag != '#')) { // '#' in key is reserved for proxy attributes as artificial header values
count = header.keyCount(key);
diff --git a/source/de/anomic/http/httpdByteCountInputStream.java b/source/de/anomic/http/httpdByteCountInputStream.java
index 457e3b6af..f1e5a319c 100644
--- a/source/de/anomic/http/httpdByteCountInputStream.java
+++ b/source/de/anomic/http/httpdByteCountInputStream.java
@@ -54,7 +54,7 @@ import java.util.HashMap;
public class httpdByteCountInputStream extends FilterInputStream {
private static final Object syncObject = new Object();
- private static final HashMap byteCountInfo = new HashMap(2);
+ private static final HashMap byteCountInfo = new HashMap(2);
private static long globalByteCount = 0;
private boolean finished = false;
@@ -144,7 +144,7 @@ public class httpdByteCountInputStream extends FilterInputStream {
if (this.byteCountAccountName != null) {
long lastByteCount = 0;
if (byteCountInfo.containsKey(this.byteCountAccountName)) {
- lastByteCount = ((Long)byteCountInfo.get(this.byteCountAccountName)).longValue();
+ lastByteCount = byteCountInfo.get(this.byteCountAccountName).longValue();
}
lastByteCount += this.byteCount;
byteCountInfo.put(this.byteCountAccountName,new Long(lastByteCount));
diff --git a/source/de/anomic/http/httpdByteCountOutputStream.java b/source/de/anomic/http/httpdByteCountOutputStream.java
index c6f6d2e33..a3f890f99 100644
--- a/source/de/anomic/http/httpdByteCountOutputStream.java
+++ b/source/de/anomic/http/httpdByteCountOutputStream.java
@@ -55,7 +55,7 @@ public class httpdByteCountOutputStream extends BufferedOutputStream {
private static long globalByteCount = 0;
private boolean finished = false;
- private static final HashMap byteCountInfo = new HashMap(2);
+ private static final HashMap byteCountInfo = new HashMap(2);
protected long byteCount;
protected String byteCountAccountName = null;
diff --git a/source/de/anomic/http/httpdFileHandler.java b/source/de/anomic/http/httpdFileHandler.java
index ca519d4ab..118edafa9 100644
--- a/source/de/anomic/http/httpdFileHandler.java
+++ b/source/de/anomic/http/httpdFileHandler.java
@@ -116,10 +116,8 @@ public final class httpdFileHandler {
private static final boolean safeServletsMode = false; // if true then all servlets are called synchronized
- // class variables
private static final Properties mimeTable = new Properties();
private static final serverClassLoader provider;
- private static final HashMap templates = new HashMap();
private static serverSwitch switchboard;
private static plasmaSwitchboard sb = plasmaSwitchboard.getSwitchboard();
@@ -130,8 +128,8 @@ public final class httpdFileHandler {
private static File htDefaultPath = null;
private static File htLocalePath = null;
- private static final HashMap templateCache;
- private static final HashMap templateMethodCache;
+ private static final HashMap> templateCache;
+ private static final HashMap> templateMethodCache;
public static boolean useTemplateCache = false;
@@ -141,8 +139,8 @@ public final class httpdFileHandler {
static {
serverSwitch switchboard = plasmaSwitchboard.getSwitchboard();
useTemplateCache = switchboard.getConfig("enableTemplateCache","true").equalsIgnoreCase("true");
- templateCache = (useTemplateCache)? new HashMap() : new HashMap(0);
- templateMethodCache = (useTemplateCache) ? new HashMap() : new HashMap(0);
+ templateCache = (useTemplateCache)? new HashMap>() : new HashMap>(0);
+ templateMethodCache = (useTemplateCache) ? new HashMap>() : new HashMap>(0);
// create a class loader
provider = new serverClassLoader(/*this.getClass().getClassLoader()*/);
@@ -396,11 +394,11 @@ public final class httpdFileHandler {
// check for cross site scripting - attacks in request arguments
if (argc > 0) {
// check all values for occurrences of script values
- Enumeration e = args.elements(); // enumeration of values
- Object val;
+ Enumeration e = args.elements(); // enumeration of values
+ String val;
while (e.hasMoreElements()) {
val = e.nextElement();
- if ((val != null) && (val instanceof String) && (((String) val).indexOf("