Use String.replace().

This commit is contained in:
Ray Greenwell
2010-07-14 19:00:19 +00:00
parent 03d748af41
commit 5bcaad90ce
2 changed files with 4 additions and 4 deletions
@@ -926,8 +926,8 @@ public class Application
/** Replaces the application directory and version in any argument. */
protected String processArg (String arg)
{
arg = StringUtil.replace(arg, "%APPDIR%", _appdir.getAbsolutePath());
arg = StringUtil.replace(arg, "%VERSION%", String.valueOf(_version));
arg = arg.replace("%APPDIR%", _appdir.getAbsolutePath());
arg = arg.replace("%VERSION%", String.valueOf(_version));
return arg;
}
@@ -1111,7 +1111,7 @@ public class Application
protected URL createVAppBase (long version)
throws MalformedURLException
{
return new URL(StringUtil.replace(_appbase, "%VERSION%", "" + version));
return new URL(_appbase.replace("%VERSION%", "" + version));
}
/**
@@ -506,7 +506,7 @@ public abstract class Getdown extends Thread
try {
// First try for a localized image.
String localeStr = Locale.getDefault().getLanguage();
imgpath = _app.getLocalPath(StringUtil.replace(path, ".", "_" + localeStr + "."));
imgpath = _app.getLocalPath(path.replace(".", "_" + localeStr + "."));
return ImageIO.read(imgpath);
} catch (IOException ioe) {
// No biggie, we'll try the generic one.