Checking for possible NPE
@@ -20,13 +20,10 @@ package io.github.mzmine.parameters.parametertypes.selectors;
import java.util.ArrayList;
import java.util.Collection;
-
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.NodeList;
-
import com.google.common.base.Strings;
-
import io.github.mzmine.datamodel.RawDataFile;
import io.github.mzmine.main.MZmineCore;
import io.github.mzmine.parameters.UserParameter;
@@ -170,8 +167,10 @@ public class RawDataFilesParameter
if (value.getSpecificFiles() != null) {
for (RawDataFile item : value.getSpecificFiles()) {
+ assert item != null;
Element newElement = parentDocument.createElement("specific_file");
- newElement.setTextContent(item.getName());
+ String fileName = item.getName();
+ newElement.setTextContent(fileName);
xmlElement.appendChild(newElement);
}
}
