Author: toad
Date: 2006-10-02 19:18:19 +0000 (Mon, 02 Oct 2006)
New Revision: 10592
Modified:
trunk/freenet/src/freenet/client/async/ClientPutter.java
trunk/freenet/src/freenet/clients/http/filter/CSSTokenizerFilter.java
Log:
Fix restarting a broken job (lost data) causing NPE.
Modified: trunk/freenet/src/freenet/client/async/ClientPutter.java
===================================================================
--- trunk/freenet/src/freenet/client/async/ClientPutter.java 2006-10-02
19:03:05 UTC (rev 10591)
+++ trunk/freenet/src/freenet/client/async/ClientPutter.java 2006-10-02
19:18:19 UTC (rev 10592)
@@ -72,6 +72,9 @@
try {
this.targetURI.checkInsertURI();
+ if(data == null)
+ throw new
InserterException(InserterException.BUCKET_ERROR, "No data to insert", null);
+
boolean cancel = false;
synchronized(this) {
if(restart) {
@@ -217,6 +220,7 @@
Logger.minor(this, "Cannot restart because not finished
for "+uri);
return false;
}
+ if(data == null) return false;
return true;
}
Modified: trunk/freenet/src/freenet/clients/http/filter/CSSTokenizerFilter.java
===================================================================
--- trunk/freenet/src/freenet/clients/http/filter/CSSTokenizerFilter.java
2006-10-02 19:03:05 UTC (rev 10591)
+++ trunk/freenet/src/freenet/clients/http/filter/CSSTokenizerFilter.java
2006-10-02 19:18:19 UTC (rev 10592)
@@ -1,4 +1,4 @@
-/* The following code was generated by JFlex 1.4.1 on 29/09/06 22:01 */
+/* The following code was generated by JFlex 1.4.1 on 29/09/06 22:11 */
/* This code is part of Freenet. It is distributed under the GNU General
* Public License, version 2 (or at your option any later version). See
@@ -14,7 +14,7 @@
/**
* This class is a scanner generated by
* <a href="http://www.jflex.de/">JFlex</a> 1.4.1
- * on 29/09/06 22:01 from the specification file
+ * on 29/09/06 22:11 from the specification file
* <tt>freenet/clients/http/filter/CSSTokenizerFilter.jflex</tt>
*/
class CSSTokenizerFilter {