Good catch Rob :-)

 

I’ve just fixed this bug in SVN trunk and 1.1 branch. The Router class
defines the createRoute() method, so it was easy to fix in
Router#attachDefault() directly.

 

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

 

 

De : Rob Heittman [mailto:[email protected]] 
Envoyé : mardi 11 août 2009 21:18
À : [email protected]
Objet : bug: riap://host and attachDefault

 

In snapshot (and probably since forever):

riap://host doesn't work if a Restlet is attached to a VirtualHost using
attachDefault instead of attach(pattern,target); an NPE is thrown in
ComponentClientDispatcher.

This is because setCurrent(hashCode) only gets called inside Routes created
by VirtualHost.createRoute(), and VirtualHost.createRoute() is not invoked
for the default attachment point.

I didn't see a no-brainer way to patch, since VirtualHost.attachDefault(...)
relies on super.attachDefault(...) to get its Route.

Should I bother filing a bug on this?  Or somebody just recommend the
approach to fix it and I'll send in a patch.

- R

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

Reply via email to