*) 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
pull/1/head
low012 16 years ago
parent 6c347a37eb
commit 8829ec5f18

@ -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&nbsp;t&auml;st";
System.out.println(text3);
System.out.println(html2unicode(text3));
}
}

@ -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

@ -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

@ -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<String, String> 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<String, String> 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<String, String> implements Cloneable
this.localized = loc;
}
@Override
public Object clone() {
return super.clone();
}

@ -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
//

Loading…
Cancel
Save