Use String.replace().
This commit is contained in:
@@ -926,8 +926,8 @@ public class Application
|
|||||||
/** Replaces the application directory and version in any argument. */
|
/** Replaces the application directory and version in any argument. */
|
||||||
protected String processArg (String arg)
|
protected String processArg (String arg)
|
||||||
{
|
{
|
||||||
arg = StringUtil.replace(arg, "%APPDIR%", _appdir.getAbsolutePath());
|
arg = arg.replace("%APPDIR%", _appdir.getAbsolutePath());
|
||||||
arg = StringUtil.replace(arg, "%VERSION%", String.valueOf(_version));
|
arg = arg.replace("%VERSION%", String.valueOf(_version));
|
||||||
return arg;
|
return arg;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1111,7 +1111,7 @@ public class Application
|
|||||||
protected URL createVAppBase (long version)
|
protected URL createVAppBase (long version)
|
||||||
throws MalformedURLException
|
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 {
|
try {
|
||||||
// First try for a localized image.
|
// First try for a localized image.
|
||||||
String localeStr = Locale.getDefault().getLanguage();
|
String localeStr = Locale.getDefault().getLanguage();
|
||||||
imgpath = _app.getLocalPath(StringUtil.replace(path, ".", "_" + localeStr + "."));
|
imgpath = _app.getLocalPath(path.replace(".", "_" + localeStr + "."));
|
||||||
return ImageIO.read(imgpath);
|
return ImageIO.read(imgpath);
|
||||||
} catch (IOException ioe) {
|
} catch (IOException ioe) {
|
||||||
// No biggie, we'll try the generic one.
|
// No biggie, we'll try the generic one.
|
||||||
|
|||||||
Reference in New Issue
Block a user