Skip to content
Snippets Groups Projects
Commit d870a372 authored by Raphael GIRARDOT's avatar Raphael GIRARDOT
Browse files

NullPointerException avoided

parent e4220a56
No related branches found
No related tags found
No related merge requests found
......@@ -147,11 +147,14 @@ public class ReadWriteOptionBook {
* Map of size 2.
*/
public void build(Collection<Map<String, String>> options) {
if (options != null) {
for (Map<String, String> nextOption : options) {
String nextName = nextOption.get(ReadWriteOptionBook.NAME_TAG);
String nextValue = nextOption.get(ReadWriteOptionBook.VALUE_TAG);
this.putOption(nextName, nextValue);
if ((nextName != null) && (nextValue != null)) {
putOption(nextName, nextValue);
}
}
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment