added test case for empty ISAF ID

This commit is contained in:
Axel Uhl
2012-06-08 16:50:07 +02:00
parent 2d2faa9daa
commit 09d747e763
2 changed files with 15 additions and 2 deletions
@@ -16,7 +16,11 @@ public class SkipperImpl extends NamedImpl implements Skipper {
@Override
public URL getIsaf() throws MalformedURLException, DOMException {
return new URL(getNode().getAttributes().getNamedItem("isaf").getNodeValue());
final String nodeValue = getNode().getAttributes().getNamedItem("isaf").getNodeValue();
URL result = null;
if (nodeValue != null && nodeValue.trim().length() > 0) {
result = new URL(nodeValue);
}
return result;
}
}