Skip to content
Snippets Groups Projects
Commit d87f5fa1 authored by felmer's avatar felmer
Browse files

replace same asserts by if constructs

SVN: 5748
parent 3336c7a3
No related branches found
No related tags found
No related merge requests found
...@@ -108,7 +108,10 @@ final class Directory extends AbstractNode implements IDirectory ...@@ -108,7 +108,10 @@ final class Directory extends AbstractNode implements IDirectory
public final IFile addKeyValuePair(final String key, final String value) public final IFile addKeyValuePair(final String key, final String value)
{ {
assert key != null : "Given key can not be null."; assert key != null : "Given key can not be null.";
assert value != null : "Given value can not be null."; if (value == null)
{
throw new IllegalArgumentException("Value for key '" + key + "' not specified.");
}
java.io.File file = new java.io.File(nodeFile, key); java.io.File file = new java.io.File(nodeFile, key);
FileUtilities.writeToFile(file, value); FileUtilities.writeToFile(file, value);
return new File(file); return new File(file);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment