mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-09-30 09:26:44 +00:00
added test case for empty ISAF ID
This commit is contained in:
+6
-2
@@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user