RE: improving Protocol.valueOf()

2009-01-13 Thread Carlos Alexandre Moscoso
You're right!

thanks for the tip!

--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=1023309


RE: improving Protocol.valueOf()

2009-01-13 Thread Jerome Louvel
Hi Carlos,

I don't consider "http://www.restlet.org/"; to be a protocol name, so I would 
expect false.

In order to achieve what you want, I would use this code:

Reference ref = new Reference("http://www.restlet.org/";);
Protocol.HTTP.equals(ref.getSchemeProtocol());

Best regards,
Jerome Louvel
--
Restlet ~ Founder and Lead developer ~ http://www.restlet.org
Noelios Technologies ~ Co-founder ~ http://www.noelios.com


-Message d'origine-
De : Carlos Alexandre Moscoso [mailto:moscoso@gmail.com] 
Envoye : dimanche 11 janvier 2009 10:24
A : discuss@restlet.tigris.org
Objet : improving Protocol.valueOf()

Hi,

I think the behavior of Protocol.valueOf() could be improved. What do you think 
of
Protocol.valueOf("http://www.restlet.org/";).equals(Protocol.HTTP) resulting in 
true?

--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=1016889

--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=1022928