Nit:  It might be a bit clearer (avoids teh ugly braces) if:

```java
if (!namespace.startsWith("/")) {
    url += "/";
}
url += namespace;
```