From d72ba2672de3ea1ae4ecc733723e5b3dd3af309d Mon Sep 17 00:00:00 2001 From: Scott Gray Date: Fri, 10 Sep 2010 09:34:37 +0000 Subject: [PATCH] Remove commented debug statements git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@995720 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/ofbiz/content/search/SearchWorker.java | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/applications/content/src/org/ofbiz/content/search/SearchWorker.java b/applications/content/src/org/ofbiz/content/search/SearchWorker.java index 8bb80c2661..86b1e01ef6 100644 --- a/applications/content/src/org/ofbiz/content/search/SearchWorker.java +++ b/applications/content/src/org/ofbiz/content/search/SearchWorker.java @@ -59,14 +59,14 @@ public class SearchWorker { GenericValue content = delegator.makeValue("Content", UtilMisc.toMap("contentId", siteId)); if (Debug.infoOn()) Debug.logInfo("in indexTree, siteId:" + siteId + " content:" + content, module); List siteList = ContentWorker.getAssociatedContent(content, "From", UtilMisc.toList("SUBSITE", "PUBLISH_LINK"), null, UtilDateTime.nowTimestamp().toString(), null); - //if (Debug.infoOn()) Debug.logInfo("in indexTree, siteList:" + siteList, module); + if (siteList != null) { Iterator iter = siteList.iterator(); while (iter.hasNext()) { GenericValue siteContent = iter.next(); String siteContentId = siteContent.getString("contentId"); List subContentList = ContentWorker.getAssociatedContent(siteContent, "From", UtilMisc.toList("SUBSITE", "PUBLISH_LINK", "SUB_CONTENT"), null, UtilDateTime.nowTimestamp().toString(), null); - //if (Debug.infoOn()) Debug.logInfo("in indexTree, subContentList:" + subContentList, module); + if (subContentList != null) { List contentIdList = FastList.newInstance(); Iterator iter2 = subContentList.iterator(); @@ -74,7 +74,7 @@ public class SearchWorker { GenericValue subContent = iter2.next(); contentIdList.add(subContent.getString("contentId")); } - //if (Debug.infoOn()) Debug.logInfo("in indexTree, contentIdList:" + contentIdList, module); + indexContentList(contentIdList, delegator, dispatcher, context); String subSiteId = siteContent.getString("contentId"); @@ -90,7 +90,7 @@ public class SearchWorker { } results.put("badIndexList", context.get("badIndexList")); results.put("goodIndexCount", context.get("goodIndexCount")); - //if (Debug.infoOn()) Debug.logInfo("in indexTree, results:" + results, module); + return results; } @@ -112,8 +112,7 @@ public class SearchWorker { } catch (Exception e) { // ignore } - //if (Debug.infoOn()) Debug.logInfo("in indexContent, reader:" + - // reader, module); + contentList = FastList.newInstance(); iter = idList.iterator(); while (iter.hasNext()) { @@ -142,8 +141,7 @@ public class SearchWorker { } catch (Exception e) { writer = new IndexWriter(indexAllPath, new StandardAnalyzer(), true, IndexWriter.MaxFieldLength.UNLIMITED); } - //if (Debug.infoOn()) Debug.logInfo("in indexContent, writer:" + - // writer, module); + Iterator contentListIter = contentList.iterator(); while (contentListIter.hasNext()) { content = contentListIter.next(); @@ -198,7 +196,7 @@ public class SearchWorker { public static void indexContent(LocalDispatcher dispatcher, Delegator delegator, Map context, GenericValue content, IndexWriter writer) throws Exception { Document doc = ContentDocument.Document(content, context, dispatcher); - //if (Debug.infoOn()) Debug.logInfo("in indexContent, content:" + content, module); + if (doc != null) { writer.addDocument(doc); Integer goodIndexCount = (Integer)context.get("goodIndexCount");