From 30f7ea07a63dc065404e7d6c53277d79b032c4d7 Mon Sep 17 00:00:00 2001 From: trifonnt Date: Sun, 20 May 2007 19:30:39 +0000 Subject: [PATCH] BugFix [ 1722278 ] Wrong usage of =="" http://sourceforge.net/tracker/index.php?func=detail&aid=1722278&group_id=176962&atid=879332 --- base/src/org/compiere/util/AmtInWords_FA.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/base/src/org/compiere/util/AmtInWords_FA.java b/base/src/org/compiere/util/AmtInWords_FA.java index 9bcf0415d8..51079ce6c6 100644 --- a/base/src/org/compiere/util/AmtInWords_FA.java +++ b/base/src/org/compiere/util/AmtInWords_FA.java @@ -103,13 +103,13 @@ public class AmtInWords_FA implements AmtInWords { if (number % 100 < 20) { soFar = numNames[number % 100]; number /= 100; - soFar = hundredsNames[number] + (soFar=="" || hundredsNames[number]=="" ? soFar : " و " + soFar); + soFar = hundredsNames[number] + ("".equals(soFar) || hundredsNames[number].equals("") ? soFar : " و " + soFar); } else { soFar = numNames[number % 10]; number /= 10; - soFar = tensNames[number % 10] + (tensNames[number % 10]=="" ? soFar : " و " + soFar); + soFar = tensNames[number % 10] + (tensNames[number % 10].equals("") ? soFar : " و " + soFar); number /= 10; - soFar = hundredsNames[number % 10] + (hundredsNames[number % 10]=="" ? soFar : " و " + soFar); + soFar = hundredsNames[number % 10] + (hundredsNames[number % 10].equals("") ? soFar : " و " + soFar); } return soFar; } // convertLessThanOneThousand @@ -136,9 +136,9 @@ public class AmtInWords_FA implements AmtInWords { long n = number % 1000; if (n != 0) { String s = convertLessThanOneThousand((int)n); - if (soFar != "") + if (!soFar.equals("")) soFar = s + " " + majorNames[place] + - (s=="" || majorNames[place]=="" ? soFar : " و " + soFar); + (s.equals("") || majorNames[place].equals("") ? soFar : " و " + soFar); else soFar = s + " " + majorNames[place]; }