You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@manifoldcf.apache.org by kw...@apache.org on 2010/03/22 19:26:21 UTC
svn commit: r926245 -
/incubator/lcf/trunk/modules/framework/pull-agent/org/apache/lcf/crawler/jobs/JobManager.java
Author: kwright
Date: Mon Mar 22 18:26:21 2010
New Revision: 926245
URL: http://svn.apache.org/viewvc?rev=926245&view=rev
Log:
Fix a NPE issue with the backup command, when job schedules are present.
Modified:
incubator/lcf/trunk/modules/framework/pull-agent/org/apache/lcf/crawler/jobs/JobManager.java
Modified: incubator/lcf/trunk/modules/framework/pull-agent/org/apache/lcf/crawler/jobs/JobManager.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/pull-agent/org/apache/lcf/crawler/jobs/JobManager.java?rev=926245&r1=926244&r2=926245&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/pull-agent/org/apache/lcf/crawler/jobs/JobManager.java (original)
+++ incubator/lcf/trunk/modules/framework/pull-agent/org/apache/lcf/crawler/jobs/JobManager.java Mon Mar 22 18:26:21 2010
@@ -155,8 +155,13 @@ public class JobManager implements IJobM
protected static void writeEnumeratedValues(java.io.OutputStream os, EnumeratedValues ev)
throws java.io.IOException
{
+ if (ev == null)
+ {
+ LCF.writeSdword(os,-1);
+ return;
+ }
int size = ev.size();
- LCF.writeDword(os,size);
+ LCF.writeSdword(os,size);
Iterator iter = ev.getValues();
while (iter.hasNext())
{
@@ -230,7 +235,9 @@ public class JobManager implements IJobM
protected EnumeratedValues readEnumeratedValues(java.io.InputStream is)
throws java.io.IOException
{
- int size = LCF.readDword(is);
+ int size = LCF.readSdword(is);
+ if (size == -1)
+ return null;
int[] values = new int[size];
int i = 0;
while (i < size)