title: Set `URI` Fragment in Java: Can `URISyntaxException` be Suppressed
body: <p>I have a <code>URI uri</code> and a <code>String fragment</code>. Now I want to add the fragment <code>fragment</code> to <code>uri</code> (or exchange <code>uri</code>'s fragment with <code>fragment</code> if <code>uri</code> already has a fragment).</p>
  <p>I can do <code>new URI(uri.getScheme(), uri.getSchemeSpecificPart(), fragment)</code>. Formally this can throw a <code>URISyntaxException</code>. How can this exception ever occur here? Can I safely suppress (<code>catch</code> and ignore) it?</p>