blank() -> isBlank().
This commit is contained in:
@@ -290,11 +290,11 @@ public class Application
|
||||
|
||||
// TODO: make this less of a hack
|
||||
String username = System.getProperty("username");
|
||||
if (!StringUtil.blank(username)) {
|
||||
if (!StringUtil.isBlank(username)) {
|
||||
_jvmargs.add("-Dusername=" + username);
|
||||
}
|
||||
String password = System.getProperty("password");
|
||||
if (!StringUtil.blank(password)) {
|
||||
if (!StringUtil.isBlank(password)) {
|
||||
_jvmargs.add("-Dpassword=" + password);
|
||||
}
|
||||
|
||||
@@ -560,7 +560,7 @@ public class Application
|
||||
BufferedReader bin = new BufferedReader(
|
||||
new InputStreamReader(fin));
|
||||
String vstr = bin.readLine();
|
||||
if (!StringUtil.blank(vstr)) {
|
||||
if (!StringUtil.isBlank(vstr)) {
|
||||
_targetVersion = Long.parseLong(vstr);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
@@ -723,7 +723,7 @@ public class Application
|
||||
protected Rectangle parseRect (HashMap cdata, String name, Rectangle def)
|
||||
{
|
||||
String value = (String)cdata.get(name);
|
||||
if (!StringUtil.blank(value)) {
|
||||
if (!StringUtil.isBlank(value)) {
|
||||
int[] v = StringUtil.parseIntArray(value);
|
||||
if (v != null && v.length == 4) {
|
||||
return new Rectangle(v[0], v[1], v[2], v[3]);
|
||||
@@ -739,7 +739,7 @@ public class Application
|
||||
protected Color parseColor (HashMap cdata, String name, Color def)
|
||||
{
|
||||
String value = (String)cdata.get(name);
|
||||
if (!StringUtil.blank(value)) {
|
||||
if (!StringUtil.isBlank(value)) {
|
||||
try {
|
||||
return new Color(Integer.parseInt(value, 16));
|
||||
} catch (Exception e) {
|
||||
|
||||
@@ -132,12 +132,12 @@ public class Getdown extends Thread
|
||||
", port=" + port + "].");
|
||||
|
||||
// if we're provided with valid values, create a proxy.txt file
|
||||
if (!StringUtil.blank(host)) {
|
||||
if (!StringUtil.isBlank(host)) {
|
||||
File pfile = _app.getLocalPath("proxy.txt");
|
||||
try {
|
||||
PrintStream pout = new PrintStream(new FileOutputStream(pfile));
|
||||
pout.println("host = " + host);
|
||||
if (!StringUtil.blank(port)) {
|
||||
if (!StringUtil.isBlank(port)) {
|
||||
pout.println("port = " + port);
|
||||
}
|
||||
pout.close();
|
||||
@@ -274,9 +274,9 @@ public class Getdown extends Thread
|
||||
*/
|
||||
protected void setProxyProperties (String host, String port)
|
||||
{
|
||||
if (!StringUtil.blank(host)) {
|
||||
if (!StringUtil.isBlank(host)) {
|
||||
System.setProperty("http.proxyHost", host);
|
||||
if (!StringUtil.blank(port)) {
|
||||
if (!StringUtil.isBlank(port)) {
|
||||
System.setProperty("http.proxyPort", port);
|
||||
}
|
||||
Log.info("Using proxy [host=" + host + ", port=" + port + "].");
|
||||
@@ -515,7 +515,7 @@ public class Getdown extends Thread
|
||||
|
||||
// if we have a background image, load it up
|
||||
BufferedImage bgimg = null;
|
||||
if (!StringUtil.blank(_ifc.background)) {
|
||||
if (!StringUtil.isBlank(_ifc.background)) {
|
||||
File bgpath = _app.getLocalPath(_ifc.background);
|
||||
try {
|
||||
bgimg = ImageIO.read(bgpath);
|
||||
@@ -526,7 +526,7 @@ public class Getdown extends Thread
|
||||
}
|
||||
|
||||
// create our user interface, and display it
|
||||
String title = StringUtil.blank(_ifc.name) ? "" : _ifc.name;
|
||||
String title = StringUtil.isBlank(_ifc.name) ? "" : _ifc.name;
|
||||
if (_frame == null) {
|
||||
_frame = new JFrame(title);
|
||||
_frame.addWindowListener(new WindowAdapter() {
|
||||
@@ -579,7 +579,7 @@ public class Getdown extends Thread
|
||||
int aidx = 0;
|
||||
String adarg = System.getProperty("appdir");
|
||||
// if not, check for a command line argument
|
||||
if (StringUtil.blank(adarg)) {
|
||||
if (StringUtil.isBlank(adarg)) {
|
||||
if (args.length < 1) {
|
||||
System.err.println(
|
||||
"Usage: java -jar getdown.jar app_dir [app_id]");
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// $Id: ConfigUtil.java,v 1.3 2004/07/30 02:23:52 mdb Exp $
|
||||
// $Id$
|
||||
|
||||
package com.threerings.getdown.util;
|
||||
|
||||
@@ -56,7 +56,7 @@ public class ConfigUtil
|
||||
|
||||
// trim whitespace and skip blank lines
|
||||
line = line.trim();
|
||||
if (StringUtil.blank(line)) {
|
||||
if (StringUtil.isBlank(line)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user