commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Reilly" <tim.rei...@consultant.com>
Subject RE: [validator] UrlValidator
Date Wed, 18 Aug 2004 21:42:44 GMT
Rob, I agree the js and java should be match-up and stick to regular
expressions where possible.

[ramble]
I had been thinking of the java.net.URL#getDefaultPort() as a last step in
addition to regular expression validation.
In addition to the reasons you gave - I think there are too many uses where
java.net wouldn't know the URL provider/handler anyhow. I've not used
o.a.c.net directly but I think that might be an example where a
URLStreamHandler doesn't always get registered for a protocol.
As you point out not worthwhile. Someone wishing that functionality could
extend or decorate the class if they want and use their own set of mappings
or not.)
[/ramble]

I've submitted patches (for release 1.1.4.) Basically, stepping through it
seemed to me that isValidPath should return true when passed "". If that
sounds correct then the patches should be on the right track (maybe, needs
double checking - the tests pass, but I'm not so familiar with the url
spec.)

HTH & thanks
-TR

PS>Thanks Martin for pointing out the test cases already had "" with expect
false. I would have banged my head for hours.



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message