Changeset 12295


Ignore:
Timestamp:
2006-07-25T13:42:17+12:00 (18 years ago)
Author:
kjdon
Message:

changed string concatenation to use a StringBuffer

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/src/org/greenstone/gatherer/Dictionary.java

    r12113 r12295  
    141141
    142142        // If the string contains arguments we have to insert them.
    143         String complete = "";
     143        StringBuffer complete = new StringBuffer();
    144144
    145145        // While we still have initial string left.
     
    152152            comment_mark = -1;
    153153        }
    154         complete = complete + initial.substring(0, opening);
    155 
     154        complete.append(initial.substring(0, opening));
     155       
    156156        // Parse arg_num
    157157        String arg_str = null;
     
    172172        // Insert argument
    173173        if (arg_str.equals("FONT")) {
    174             complete = complete + (font != null ? font.getFontName() : "Arial");
     174            complete.append((font != null ? font.getFontName() : "Arial"));
    175175        }
    176176        else {
    177177            int arg_num = Integer.parseInt(arg_str);
    178178            if (args != null && 0 <= arg_num && arg_num < args.length) {
    179             complete = complete + args[arg_num];
     179            complete.append(args[arg_num]);
    180180            }
    181181        }
    182182        }
    183         complete = complete + initial;
    184 
    185         return complete;
     183        complete.append(initial);
     184       
     185        return complete.toString();
    186186    }
    187187    catch (Exception exception) {
Note: See TracChangeset for help on using the changeset viewer.