some code cleanup. removed unnecessary semikolons, unused vars, etc.
[mir.git] / source / mir / misc / StringUtil.java
index f9c996a..b05c748 100755 (executable)
@@ -41,7 +41,7 @@ import java.util.TimeZone;
 /**
  * Statische Hilfsmethoden zur Stringbehandlung
  *
- * @version $Id: StringUtil.java,v 1.33.2.5 2003/10/23 14:55:28 rk Exp $
+ * @version $Id: StringUtil.java,v 1.33.2.6 2005/02/10 16:22:30 rhindes Exp $
  * @author mir-coders group
  *
  */
@@ -195,11 +195,11 @@ public final class StringUtil {
   }
 
   /**
-   * Ersetzt in String <code>s</code> das Regexp <code>pattern</code> durch <code>substitute</code>
-   * @param s
+   * Replaces in <code>haystack</code> matching <code>pattern</code> by <code>substitute</code>
+   * @param haystack
    * @param pattern
    * @param substitute
-   * @return String mit den Ersetzungen
+   * @return String with replacements.
    */
   public static String regexpReplace(String haystack, String pattern, String substitute) {
     try {
@@ -305,28 +305,27 @@ public final class StringUtil {
   /**
    * this routine takes text in url format and makes
    * a clickaeble "<href>" link removing any "illegal" html tags
-   * @param haystack, the url
-   * @param title, the href link text
-   * @param imagRoot, the place to find icons
-   * @param extImage, the url of the icon to show next to the link
+   * @param haystack  the url
+   * @param title  the href link text
+   * @param imageRoot  the place to find icons
+   * @param extImage  the url of the icon to show next to the link
    * @return a String containing the url
    */
   public static String createURLLinks(String haystack, String title, String imageRoot,String extImage) {
     if (title == null) {
       return re_url.substituteAll(haystack,"<img src=\""+imageRoot+"/"+extImage+"\" border=\"0\"/>&#160;<a href=\"$0\">$0</a>");
-    } else {
-      title = removeHTMLTags(title);
-      return re_url.substituteAll(haystack,"<img src=\""+imageRoot+"/"+extImage+"\" border=\"0\"/>&#160;<a href=\"$0\">"+title+"</a>");
     }
+               title = removeHTMLTags(title);
+               return re_url.substituteAll(haystack,"<img src=\""+imageRoot+"/"+extImage+"\" border=\"0\"/>&#160;<a href=\"$0\">"+title+"</a>");
   }
 
   /**
    * this routine takes text in url format and makes
    * a clickaeble "<href>" link removing any "illegal" html tags
-   * @param haystack, the url
-   * @param imageRoot, the place to find icons
-   * @param extImage, the url of the icon to show next to the link
-   * @param intImage, unused
+   * @param haystack the url
+   * @param imageRoot the place to find icons
+   * @param extImage the url of the icon to show next to the link
+   * @param intImage unused
    * @return a String containing the url
    */
   public static String createURLLinks(String haystack, String title, String imageRoot,String extImage,String intImage) {