From 8829ec5f18fa35cdcabf5b3d991edd249aa873cf Mon Sep 17 00:00:00 2001 From: low012 Date: Tue, 13 Oct 2009 20:57:56 +0000 Subject: [PATCH] *) made sure that   is replaced with a space and not just deleted in CharacterCoding.java *) added annotations and made minor changes to serverObjects.java *) set subversion properties for several files git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@6409 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- .../anomic/document/parser/html/CharacterCoding.java | 9 +++++++++ source/de/anomic/server/serverCharBuffer.java | 6 +++--- source/de/anomic/server/serverCoreSocket.java | 4 ++-- source/de/anomic/server/serverObjects.java | 11 ++++++----- source/de/anomic/server/serverProfiling.java | 6 +++--- 5 files changed, 23 insertions(+), 13 deletions(-) diff --git a/source/de/anomic/document/parser/html/CharacterCoding.java b/source/de/anomic/document/parser/html/CharacterCoding.java index 18da2dedb..82225679e 100644 --- a/source/de/anomic/document/parser/html/CharacterCoding.java +++ b/source/de/anomic/document/parser/html/CharacterCoding.java @@ -30,6 +30,7 @@ public class CharacterCoding { private static final char amp_unicode = "\u0026".charAt(0); private static final String amp_html = "&"; + private static final String space_html = " "; private static final String[] mapping4xml = { "\"",""", //quotation mark @@ -253,6 +254,10 @@ public class CharacterCoding { sb.append(amp_unicode); continue; } + if (s.equals(space_html)) { + sb.append(" "); + continue; + } if ((r = html2unicode4xml.get(s)) != null) { sb.append(r.charValue()); continue; @@ -288,5 +293,9 @@ public class CharacterCoding { final String text2 = "encodeUnicode2xml: & \" < >"; System.out.println(text2); System.out.println(unicode2xml(text2, true)); + + final String text3 = "space täst"; + System.out.println(text3); + System.out.println(html2unicode(text3)); } } diff --git a/source/de/anomic/server/serverCharBuffer.java b/source/de/anomic/server/serverCharBuffer.java index ed2f815cd..390daa061 100644 --- a/source/de/anomic/server/serverCharBuffer.java +++ b/source/de/anomic/server/serverCharBuffer.java @@ -4,9 +4,9 @@ // first published on http://www.anomic.de // Frankfurt, Germany, 2004 // -// $LastChangedDate: 2006-02-20 23:57:42 +0100 (Mo, 20 Feb 2006) $ -// $LastChangedRevision: 1715 $ -// $LastChangedBy: borg-0300 $ +// $LastChangedDate$ +// $LastChangedRevision$ +// $LastChangedBy$ // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/source/de/anomic/server/serverCoreSocket.java b/source/de/anomic/server/serverCoreSocket.java index 60302edac..b1f41d161 100644 --- a/source/de/anomic/server/serverCoreSocket.java +++ b/source/de/anomic/server/serverCoreSocket.java @@ -4,8 +4,8 @@ // //(C) 2006 by Martin Thelian // -//last change: $LastChangedDate: 2006-05-12 16:35:56 +0200 (Fr, 12 Mai 2006) $ by $LastChangedBy: theli $ -//Revision: $LastChangedRevision: 2086 $ +//last change: $LastChangedDate$ by $LastChangedBy$ +//Revision: $LastChangedRevision$ // //This program is free software; you can redistribute it and/or modify //it under the terms of the GNU General Public License as published by diff --git a/source/de/anomic/server/serverObjects.java b/source/de/anomic/server/serverObjects.java index 6000dd5a2..cba260223 100644 --- a/source/de/anomic/server/serverObjects.java +++ b/source/de/anomic/server/serverObjects.java @@ -5,9 +5,9 @@ //Frankfurt, Germany, 2004 //(C) changes by Bjoern 'fuchs' Krombholz // -// $LastChangedDate: $ -// $LastChangedRevision: $ -// $LastChangedBy: $ +// $LastChangedDate$ +// $LastChangedRevision$ +// $LastChangedBy$ // //This program is free software; you can redistribute it and/or modify //it under the terms of the GNU General Public License as published by @@ -84,6 +84,7 @@ public class serverObjects extends HashMap implements Cloneable * @return The value that was added to the map. * @see java.util.Hashtable#put(K, V) */ + @Override public String put(final String key, final String value) { if (key == null) { // this does nothing @@ -287,8 +288,7 @@ public class serverObjects extends HashMap implements Cloneable public boolean hasValue(final String key) { final String s = super.get(key); - if (s == null) return false; - if (s == "") return false; + if (s == null || s.length() < 1) return false; return true; } @@ -347,6 +347,7 @@ public class serverObjects extends HashMap implements Cloneable this.localized = loc; } + @Override public Object clone() { return super.clone(); } diff --git a/source/de/anomic/server/serverProfiling.java b/source/de/anomic/server/serverProfiling.java index 6d4cf4049..e96dc8277 100644 --- a/source/de/anomic/server/serverProfiling.java +++ b/source/de/anomic/server/serverProfiling.java @@ -4,9 +4,9 @@ // // This is a part of YaCy, a peer-to-peer based web search engine // -// $LastChangedDate: 2006-04-02 22:40:07 +0200 (So, 02 Apr 2006) $ -// $LastChangedRevision: 1986 $ -// $LastChangedBy: orbiter $ +// $LastChangedDate$ +// $LastChangedRevision$ +// $LastChangedBy$ // // LICENSE //