blank() -> isBlank().

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