From 15601d7f2b2f615ae117c406aa11fbe254d189c4 Mon Sep 17 00:00:00 2001 From: teo_sarca Date: Mon, 24 Nov 2008 14:50:34 +0000 Subject: [PATCH] MFreightCategory: not touching the style but at least using optimum code --- base/src/org/compiere/model/MFreightCategory.java | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/base/src/org/compiere/model/MFreightCategory.java b/base/src/org/compiere/model/MFreightCategory.java index 81f4149dc6..f4a691678b 100644 --- a/base/src/org/compiere/model/MFreightCategory.java +++ b/base/src/org/compiere/model/MFreightCategory.java @@ -77,13 +77,7 @@ public class MFreightCategory extends X_M_FreightCategory { Query q = new Query(ctx, MFreightCategory.Table_Name, "Value=? AND AD_Client_ID=?", trxName); q.setParameters(new Object[]{value, Env.getAD_Client_ID(ctx)}); - List list = q.list(); - if (list.size()>0) { - return(list.get(0)); - } else { - return(null); - } - + return q.first(); } }