lib\java: loosen checks in Url constructor