perfsonar-dev - perfsonar: r3486 - trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/measurementArchive/flowsa/nfcapd
Subject: perfsonar development work
List archive
perfsonar: r3486 - trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/measurementArchive/flowsa/nfcapd
Chronological Thread
- From:
- To:
- Subject: perfsonar: r3486 - trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/measurementArchive/flowsa/nfcapd
- Date: Thu, 6 Mar 2008 12:05:06 -0500
Author: michael.bischoff
Date: 2008-03-06 12:05:05 -0500 (Thu, 06 Mar 2008)
New Revision: 3486
Modified:
trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/measurementArchive/flowsa/nfcapd/Exporter.java
Log:
ASSIGNED - bug 371: Flow S&A MA: MA selects one log file more than it should
https://bugzilla.perfsonar.net/show_bug.cgi?id=371
Modified:
trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/measurementArchive/flowsa/nfcapd/Exporter.java
===================================================================
---
trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/measurementArchive/flowsa/nfcapd/Exporter.java
2008-03-06 15:40:31 UTC (rev 3485)
+++
trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/measurementArchive/flowsa/nfcapd/Exporter.java
2008-03-06 17:05:05 UTC (rev 3486)
@@ -92,12 +92,10 @@
String value = new
SimpleDateFormat("'nfcapd.'yyyyMMddHHmm").format(time);
String[] sortedFiles = myDirectory.list();
Arrays.sort(sortedFiles);
- String last = null;
for(String file : sortedFiles) {
- if(file.compareTo(value)>0) {
- return last;
+ if(file.compareTo(value)<=0) {
+ return file;
}
- last = file;
}
}
return null;
@@ -111,6 +109,7 @@
* @return filename
*/
public String getClosestFileAfter(Date time) {
+ if(time==null) throw new IllegalArgumentException("time
cannot be null");
String last = null;
if(myDirectory.exists()) {
String value = new
SimpleDateFormat("'nfcapd.'yyyyMMddHHmm").format(time);
- perfsonar: r3486 - trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/measurementArchive/flowsa/nfcapd, svnlog, 03/06/2008
Archive powered by MHonArc 2.6.16.