You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xindice-dev@xml.apache.org by vg...@apache.org on 2008/11/09 22:49:00 UTC
svn commit: r712561 - in
/xml/xindice/trunk/java/src/org/apache/xindice/core/indexer:
IndexManager.java NameIndexer.java
Author: vgritsenko
Date: Sun Nov 9 13:48:59 2008
New Revision: 712561
URL: http://svn.apache.org/viewvc?rev=712561&view=rev
Log:
cleanup
Modified:
xml/xindice/trunk/java/src/org/apache/xindice/core/indexer/IndexManager.java
xml/xindice/trunk/java/src/org/apache/xindice/core/indexer/NameIndexer.java
Modified: xml/xindice/trunk/java/src/org/apache/xindice/core/indexer/IndexManager.java
URL: http://svn.apache.org/viewvc/xml/xindice/trunk/java/src/org/apache/xindice/core/indexer/IndexManager.java?rev=712561&r1=712560&r2=712561&view=diff
==============================================================================
--- xml/xindice/trunk/java/src/org/apache/xindice/core/indexer/IndexManager.java (original)
+++ xml/xindice/trunk/java/src/org/apache/xindice/core/indexer/IndexManager.java Sun Nov 9 13:48:59 2008
@@ -323,7 +323,11 @@
}
}
- Stopwatch sw = new Stopwatch("Populated Indexes", true);
+ Stopwatch sw = null;
+ if (log.isDebugEnabled()) {
+ sw = new Stopwatch("Populated Indexes", true);
+ }
+
RecordSet rs = collection.getFiler().getRecordSet();
while (rs.hasMoreRecords()) {
// Read only key, we don't need filer-level value
@@ -350,9 +354,9 @@
}
status.put(list[i].getName(), STATUS_READY);
}
- sw.stop();
if (log.isDebugEnabled()) {
+ sw.stop();
for (int i = 0; i < list.length; i++) {
log.debug("Index Complete: " + list[i].getName());
}
Modified: xml/xindice/trunk/java/src/org/apache/xindice/core/indexer/NameIndexer.java
URL: http://svn.apache.org/viewvc/xml/xindice/trunk/java/src/org/apache/xindice/core/indexer/NameIndexer.java?rev=712561&r1=712560&r2=712561&view=diff
==============================================================================
--- xml/xindice/trunk/java/src/org/apache/xindice/core/indexer/NameIndexer.java (original)
+++ xml/xindice/trunk/java/src/org/apache/xindice/core/indexer/NameIndexer.java Sun Nov 9 13:48:59 2008
@@ -47,8 +47,6 @@
private static final Log log = LogFactory.getLog(NameIndexer.class);
- private static final IndexMatch[] EmptyMatches = new IndexMatch[0];
-
private static final String NAME = "name";
private static final String PATTERN = "pattern";
@@ -179,7 +177,7 @@
}
}
- return (IndexMatch[]) results.toArray(EmptyMatches);
+ return (IndexMatch[]) results.toArray(new IndexMatch[results.size()]);
}
public IndexerEventHandler getIndexerEventHandler() {