From 9d5f8f2ac6462dac785dafa1677c34ac9bd3b1f4 Mon Sep 17 00:00:00 2001 From: mjudd Date: Wed, 7 Mar 2007 00:20:08 +0000 Subject: [PATCH] BugFix https://sourceforge.net/tracker/?func=detail&atid=879332&aid=1673714&group_id=176962 --- looks/src/org/compiere/plaf/CompiereLabelUI.java | 2 +- looks/src/org/compiere/swing/CComboBox.java | 2 +- looks/src/org/compiere/util/Ini.java | 2 +- serverApps/src/main/servlet/org/compiere/www/WebField.java | 4 ++-- sqlj/src/org/compiere/sqlj/Adempiere.java | 2 +- sqlj/src/org/compiere/sqlj/Compiere.java | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/looks/src/org/compiere/plaf/CompiereLabelUI.java b/looks/src/org/compiere/plaf/CompiereLabelUI.java index cf844413aa..28408e01d8 100644 --- a/looks/src/org/compiere/plaf/CompiereLabelUI.java +++ b/looks/src/org/compiere/plaf/CompiereLabelUI.java @@ -94,7 +94,7 @@ public class CompiereLabelUI extends MetalLabelUI { JLabel label = (JLabel)e.getSource (); String key = getName (); - if (key == PRESS) + if (key.equals(PRESS)) { doPress (label); } diff --git a/looks/src/org/compiere/swing/CComboBox.java b/looks/src/org/compiere/swing/CComboBox.java index 7c05bf59e4..c28f7ccbe6 100644 --- a/looks/src/org/compiere/swing/CComboBox.java +++ b/looks/src/org/compiere/swing/CComboBox.java @@ -78,7 +78,7 @@ public class CComboBox extends JComboBox public CComboBox(final Object items[], String key) { this(items); - if (key == null) + if (key.equals(null)) return; for (int i = 0; i < 0; i++) { diff --git a/looks/src/org/compiere/util/Ini.java b/looks/src/org/compiere/util/Ini.java index 3605d480a3..2d6158484b 100644 --- a/looks/src/org/compiere/util/Ini.java +++ b/looks/src/org/compiere/util/Ini.java @@ -404,7 +404,7 @@ public final class Ini implements Serializable s_prop.setProperty(key, SecureInterface.CLEARVALUE_START + value + SecureInterface.CLEARVALUE_END); else { - if (value == null) + if (value.equals(null)) s_prop.setProperty(key, ""); else { diff --git a/serverApps/src/main/servlet/org/compiere/www/WebField.java b/serverApps/src/main/servlet/org/compiere/www/WebField.java index e97835c28c..a312be8299 100644 --- a/serverApps/src/main/servlet/org/compiere/www/WebField.java +++ b/serverApps/src/main/servlet/org/compiere/www/WebField.java @@ -446,10 +446,10 @@ public class WebField { ValueNamePair p = (ValueNamePair)list[i]; key = p.getValue(); - if (key == null || key.length() == 0) + if (key.equals(null) || key.length() == 0) key = "??"; String name = p.getName(); - if (name == null || name.length() == 0) + if (name.equals(null) || name.length() == 0) name = "???"; name = Util.maskHTML(name); options[i] = new option(key).addElement(name); diff --git a/sqlj/src/org/compiere/sqlj/Adempiere.java b/sqlj/src/org/compiere/sqlj/Adempiere.java index 61ee482831..1b0feae738 100644 --- a/sqlj/src/org/compiere/sqlj/Adempiere.java +++ b/sqlj/src/org/compiere/sqlj/Adempiere.java @@ -66,7 +66,7 @@ public class Adempiere implements Serializable */ public static String getProperty (String key) throws SQLException { - if (key == null || key.length() == 0) + if (key .equals(null) || key.length() == 0) return "null"; return System.getProperty(key, "NotFound"); } // environment diff --git a/sqlj/src/org/compiere/sqlj/Compiere.java b/sqlj/src/org/compiere/sqlj/Compiere.java index d67efe59f6..3994526a33 100755 --- a/sqlj/src/org/compiere/sqlj/Compiere.java +++ b/sqlj/src/org/compiere/sqlj/Compiere.java @@ -66,7 +66,7 @@ public class Compiere implements Serializable */ public static String getProperty (String key) throws SQLException { - if (key == null || key.length() == 0) + if (key.equals(null) || key.length() == 0) return "null"; return System.getProperty(key, "NotFound"); } // environment