Here you can find the source of normalizedUri(URI uri)
public static URI normalizedUri(URI uri)
//package com.java2s; //License from project: Apache License import com.google.common.base.Throwables; import java.net.URI; import java.net.URISyntaxException; public class Main { public static URI normalizedUri(URI uri) { try {/*from w w w . j ava2 s . c o m*/ return new URI(uri.getScheme(), null, uri.getHost(), uri.getPort(), null, null, null); } catch (URISyntaxException e) { throw Throwables.propagate(e); } } }