Return-Path: Delivered-To: apmail-incubator-ofbiz-commits-archive@locus.apache.org Received: (qmail 15727 invoked from network); 4 Dec 2006 17:41:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 Dec 2006 17:41:57 -0000 Received: (qmail 67631 invoked by uid 500); 4 Dec 2006 17:42:06 -0000 Delivered-To: apmail-incubator-ofbiz-commits-archive@incubator.apache.org Received: (qmail 67617 invoked by uid 500); 4 Dec 2006 17:42:06 -0000 Mailing-List: contact ofbiz-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ofbiz-dev@incubator.apache.org Delivered-To: mailing list ofbiz-commits@incubator.apache.org Received: (qmail 67607 invoked by uid 99); 4 Dec 2006 17:42:05 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Dec 2006 09:42:05 -0800 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Dec 2006 09:41:56 -0800 Received: by eris.apache.org (Postfix, from userid 65534) id 0EEB61A984D; Mon, 4 Dec 2006 09:41:16 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r482260 - in /incubator/ofbiz/trunk: applications/order/src/org/ofbiz/order/order/ framework/base/src/base/org/ofbiz/base/util/ framework/base/src/base/org/ofbiz/base/util/cache/ framework/minilang/src/org/ofbiz/minilang/method/eventops/ Date: Mon, 04 Dec 2006 17:41:15 -0000 To: ofbiz-commits@incubator.apache.org From: jacopoc@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20061204174116.0EEB61A984D@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: jacopoc Date: Mon Dec 4 09:41:14 2006 New Revision: 482260 URL: http://svn.apache.org/viewvc?view=rev&rev=482260 Log: Applied patch from Stefan Huehner (OFBIZ-514) to remove some unnecessary casts. Modified: incubator/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java incubator/ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/StringUtil.java incubator/ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/cache/UtilCache.java incubator/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/eventops/WebappPropertyToField.java Modified: incubator/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java?view=diff&rev=482260&r1=482259&r2=482260 ============================================================================== --- incubator/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java (original) +++ incubator/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java Mon Dec 4 09:41:14 2006 @@ -1690,7 +1690,7 @@ for (Iterator groupiter = group.iterator(); groupiter.hasNext(); ) { GenericValue returnItem = (GenericValue) groupiter.next(); if (returnItem.getDouble("returnQuantity") != null) { - returned += ((Double) returnItem.getDouble("returnQuantity")).doubleValue(); + returned += (returnItem.getDouble("returnQuantity")).doubleValue(); } } Modified: incubator/ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/StringUtil.java URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/StringUtil.java?view=diff&rev=482260&r1=482259&r2=482260 ============================================================================== --- incubator/ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/StringUtil.java (original) +++ incubator/ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/StringUtil.java Mon Dec 4 09:41:14 2006 @@ -275,7 +275,7 @@ public static String cleanHexString(String str) { StringBuffer buf = new StringBuffer(); for (int i = 0; i < str.length(); i++) { - if (str.charAt(i) != (int) 32 && str.charAt(i) != ':') { + if (str.charAt(i) != 32 && str.charAt(i) != ':') { buf.append(str.charAt(i)); } } Modified: incubator/ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/cache/UtilCache.java URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/cache/UtilCache.java?view=diff&rev=482260&r1=482259&r2=482260 ============================================================================== --- incubator/ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/cache/UtilCache.java (original) +++ incubator/ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/cache/UtilCache.java Mon Dec 4 09:41:14 2006 @@ -274,7 +274,7 @@ } int maxMemSize = this.maxInMemory; - if (maxMemSize == 0) maxMemSize = (int) maxSize; + if (maxMemSize == 0) maxMemSize = maxSize; this.cacheLineTable = new CacheLineTable(this.fileStore, this.name, this.useFileSystemStore, maxMemSize); } @@ -493,7 +493,7 @@ * @param maxSize The maximum number of elements in the cache */ public void setMaxSize(int maxSize) { - cacheLineTable.setLru((int) maxSize); + cacheLineTable.setLru(maxSize); this.maxSize = maxSize; } Modified: incubator/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/eventops/WebappPropertyToField.java URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/eventops/WebappPropertyToField.java?view=diff&rev=482260&r1=482259&r2=482260 ============================================================================== --- incubator/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/eventops/WebappPropertyToField.java (original) +++ incubator/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/eventops/WebappPropertyToField.java Mon Dec 4 09:41:14 2006 @@ -74,15 +74,9 @@ } } - // if fieldVal is null, or is a String and has zero length, use defaultVal - if (fieldVal == null) { + // if fieldVal is null, or has zero length, use defaultVal + if ((fieldVal == null) || (fieldVal.length() == 0)){ fieldVal = defaultVal; - } else if (fieldVal instanceof String) { - String strVal = (String) fieldVal; - - if (strVal.length() == 0) { - fieldVal = defaultVal; - } } if (!mapAcsr.isEmpty()) {