Update of /var/cvs/contributions/lucene/src/org/mmbase/module/lucene
In directory james.mmbase.org:/tmp/cvs-serv12972
Modified Files:
Indexer.java
Log Message:
avoid errors if duration not yeat determined
See also:
http://cvs.mmbase.org/viewcvs/contributions/lucene/src/org/mmbase/module/lucene
Index: Indexer.java
===================================================================
RCS file:
/var/cvs/contributions/lucene/src/org/mmbase/module/lucene/Indexer.java,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -b -r1.50 -r1.51
--- Indexer.java 14 Jan 2008 18:33:35 -0000 1.50
+++ Indexer.java 29 Jan 2008 09:52:36 -0000 1.51
@@ -34,7 +34,7 @@
*
* @author Pierre van Rooden
* @author Michiel Meeuwissen
- * @version $Id: Indexer.java,v 1.50 2008/01/14 18:33:35 michiel Exp $
+ * @version $Id: Indexer.java,v 1.51 2008/01/29 09:52:36 michiel Exp $
**/
public class Indexer {
@@ -211,8 +211,12 @@
}
public long getLastFullIndexDuration() {
Properties lastIndexes = loadLastFullIndexTimes();
+ String dur = lastIndexes.getProperty(index + ".duration");
+ if (dur != null &&
org.mmbase.datatypes.StringDataType.LONG_PATTERN.matcher(dur).matches()) {
return Long.parseLong(lastIndexes.getProperty(index + ".duration"));
-
+ } else {
+ return -1L;
+ }
}
protected Date setLastFullIndex(long startTime) {
Properties lastIndexes = loadLastFullIndexTimes();
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs