X-Git-Url: http://lists.indexdata.dk/cgi-bin?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fcom%2Findexdata%2Fmkjsf%2Fpazpar2%2Fcommands%2FInitCommand.java;h=874387437315e3060de784825993165c86f9dee3;hb=6c92dd9a72ae1fa27dd061c1897531879b8c0ba6;hp=27958c40d7ed6f276fb3cf77c41ef94d1ed87de6;hpb=fc1ac55e0dd989bc3a5a023c5931e8f4e2774668;p=mkjsf-moved-to-github.git
diff --git a/src/main/java/com/indexdata/mkjsf/pazpar2/commands/InitCommand.java b/src/main/java/com/indexdata/mkjsf/pazpar2/commands/InitCommand.java
index 27958c4..8743874 100644
--- a/src/main/java/com/indexdata/mkjsf/pazpar2/commands/InitCommand.java
+++ b/src/main/java/com/indexdata/mkjsf/pazpar2/commands/InitCommand.java
@@ -6,7 +6,7 @@ import com.indexdata.mkjsf.pazpar2.commands.sp.InitCommandSp;
import com.indexdata.mkjsf.pazpar2.commands.sp.ServiceProxyCommand;
/**
- * Represents a Pazpar2 init
command, can be accessed by pzreq.init
+ * init
Pazpar2 command, referenced as: pzreq.init
*
* @author Niels Erik
*
@@ -75,7 +75,9 @@ public class InitCommand extends Pazpar2Command implements ServiceProxyCommand {
newCommand.setParameterInState(parameters.get(parameterName).copy());
}
newCommand.spCommand = new InitCommandSp(this);
- newCommand.spCommand.setUploadedInitDoc(spCommand.getUploadedInitDoc());
+ if (spCommand != null && spCommand.getUploadedInitDoc()!=null) {
+ newCommand.spCommand.setUploadedInitDoc(spCommand.getUploadedInitDoc());
+ }
return newCommand;
}