> On 17 Oct 2016, at 10:53, Claes Redestad <claes.redes...@oracle.com> wrote: > > Hi Paul, > > On 2016-10-17 19:39, Paul Sandoz wrote: >> Hi Claes, >> >> This looks good. > > Thanks! > >> >> Did you consider adding asserts to the package private constructor? > > No, might be reasonable. Do you insist? :-) >
A gentle insistence. It could stop a nasty bug in the future if this method gets used in other places and incorrect URI instances are produced e.g.: assert foo(scheme, path); static boolean foo(String scheme, String path) { URI u = new URI(scheme + “:/“ + path); return scheme.equals(u.scheme) && path.equals(u.path); } Paul.