implementing Java's URI in GWT

443 views
Skip to first unread message

alexp

unread,
Feb 7, 2012, 2:58:01 PM2/7/12
to Google Web Toolkit
Hello there,

I recently noticed this TODO in the javadoc for the UriBuilder
constructor:

"Add a constructor that parses an existing URL"

I searched a little for an existing class to parse URIs in GWT but did
not have much luck, so I thought I'd give it a shot to implement one.

My approach was to mimic the API in Java's java.net.URI class, and
derive the implementation from Steven Levithan's JavaScript parseUri
1.2 code[1].

I've banged out a preliminary version of the class and would like some
feedback, but before I do so, I was wondering if it's even possible to
submit this to GWT, as I am reading the "Making GWT Better" page about
code contributions and the CLA agreements and am not quite sure how
that affects the fact that a portion of the code is derived from
Steven's class. His code is released under the MIT license and I am
more than willing to include whatever notices/attribution in the code
as necessary.

Any ideas?

Cheers,

Alex

1. http://blog.stevenlevithan.com/archives/parseuri

Thomas Broyer

unread,
Feb 7, 2012, 4:39:32 PM2/7/12
to google-we...@googlegroups.com
AIUI,MIT license allows you to re-license the code under Apache (sublicense). But I wonder why you simply don't use the regex from the RFC?

Sebastian Gurin

unread,
Feb 7, 2012, 4:44:56 PM2/7/12
to google-we...@googlegroups.com
On Tue, 7 Feb 2012 13:39:32 -0800 (PST)
Thomas Broyer <t.br...@gmail.com> wrote:

> AIUI,MIT license allows you to re-license the code under Apache (sublicense). But I wonder why you simply don't use the regex from the RFC?

For a java programmer it is nicer to use the java API if possible, I think...

>
> --
> You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
> To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/5C-lne7I9RsJ.
> To post to this group, send email to google-we...@googlegroups.com.
> To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
>


--
Sebastian Gurin <sgu...@softpoint.org>

Thomas Broyer

unread,
Feb 8, 2012, 4:06:29 AM2/8/12
to google-we...@googlegroups.com


On Tuesday, February 7, 2012 10:44:56 PM UTC+1, Sebastian Gurin wrote:
On Tue, 7 Feb 2012 13:39:32 -0800 (PST)
Thomas Broyer wrote:

> AIUI,MIT license allows you to re-license the code under Apache (sublicense). But I wonder why you simply don't use the regex from the RFC?

For a java programmer it is nicer to use the java API if possible, I think...

I was suggesting using the RFC as the starting point, rather than some JS code by another developer (which itself is based on the regex from the RFC) 
Reply all
Reply to author
Forward
0 new messages