CVS update: JGroups/src/org/jgroups/protocols FILE_PING.java
"Bela Ban" <[email protected]> Mon, 18 Oct 2010 07:22:03 +0000
| Newsgroups | gmane.comp.java.javagroups.cvs |
|---|---|
| Message-ID | <[email protected]> |
User: belaban
Date: 10/10/18 07:22:02
Modified: src/org/jgroups/protocols FILE_PING.java
Log:
removing files which are corrupted (https://jira.jboss.org/browse/JGRP-1246)
Revision Changes Path
1.21 +10 -3 JGroups/src/org/jgroups/protocols/FILE_PING.java
Index: FILE_PING.java
===================================================================
RCS file: /cvsroot/javagroups/JGroups/src/org/jgroups/protocols/FILE_PING.java,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- FILE_PING.java 20 Jul 2010 10:34:19 -0000 1.20
+++ FILE_PING.java 18 Oct 2010 07:22:02 -0000 1.21
@@ -22,7 +22,7 @@
* added to our transport's UUID-PhysicalAddress cache.<p/>
* The design is at doc/design/FILE_PING.txt
* @author Bela Ban
- * @version $Id: FILE_PING.java,v 1.20 2010/07/20 10:34:19 belaban Exp $
+ * @version $Id: FILE_PING.java,v 1.21 2010/10/18 07:22:02 belaban Exp $
*/
@Experimental
public class FILE_PING extends Discovery {
@@ -186,8 +186,15 @@
File[] files=dir.listFiles(filter);
if(files != null) {
- for(File file: files)
- retval.add(readFile(file));
+ for(File file: files) {
+ PingData data=readFile(file);
+ if(data == null) {
+ log.warn("failed reading " + file.getName() + ": removing it");
+ file.delete();
+ }
+ else
+ retval.add(data);
+ }
}
return retval;
}
------------------------------------------------------------------------------
Download new Adobe(R) Flash(R) Builder(TM) 4
The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly
Flex(R) Builder(TM)) enable the development of rich applications that run
across multiple browsers and platforms. Download your free trials today!
http://p.sf.net/sfu/adobe-dev2dev