From bf4dcc16dd76cb4801b504526ef68a2148f81363 Mon Sep 17 00:00:00 2001 From: mdb Date: Sun, 17 Feb 2002 08:28:34 +0000 Subject: [PATCH] Was referencing value before it was known to be not null and was creating a new string when we could instead use equalsIgnoreCase(). git-svn-id: https://samskivert.googlecode.com/svn/trunk@577 6335cc39-0255-0410-8fd6-9bcaacd3b74c --- .../samskivert/src/java/com/samskivert/util/Config.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/projects/samskivert/src/java/com/samskivert/util/Config.java b/projects/samskivert/src/java/com/samskivert/util/Config.java index 401c1a9e..ce885997 100644 --- a/projects/samskivert/src/java/com/samskivert/util/Config.java +++ b/projects/samskivert/src/java/com/samskivert/util/Config.java @@ -1,5 +1,5 @@ // -// $Id: Config.java,v 1.7 2001/10/04 00:24:16 mdb Exp $ +// $Id: Config.java,v 1.8 2002/02/17 08:28:34 mdb Exp $ // // samskivert library - useful routines for java programs // Copyright (C) 2001 Michael Bayne @@ -167,10 +167,8 @@ public class Config public boolean getValue (String name, boolean defval) { String val = resolveProperty(name); - // if it's not specified, we return the default - val = val.toLowerCase(); - return (val == null) ? defval : (!val.equals("false")); + return (val == null) ? defval : !val.equalsIgnoreCase("false"); } /**