Hi Steffen,

Thanks for reporting this bug. I've just fixed it in SVN and released the
first snapshot of version 1.0 RC1.
http://www.restlet.org/downloads/current.zip

Best regards,
Jerome  

> -----Message d'origine-----
> De : news [mailto:[EMAIL PROTECTED] De la part de Steffen Eichenberg
> Envoyé : mardi 28 novembre 2006 15:28
> À : [email protected]
> Objet : NPE in b21 class com.noelios.restlet.http.HttpServerCall
> 
> Hello,
> 
> 
> today i switched from b19 to b21 and found what seems like a new bug.
> 
> My application is running as a servlet in Tomcat 5.5. I am 
> using the standard
> ServerServlet, which redirects to my class which is derived 
> from Application.
> 
> When the first call is issued from my client to the server i 
> am getting the
> following stack trace:
> 
> 
> java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
>       java.util.ArrayList.RangeCheck(ArrayList.java:547)
>       java.util.ArrayList.get(ArrayList.java:322)
>       
> com.noelios.restlet.http.HttpServerCall.<init>(HttpServerCall.java:66)
>       
> com.noelios.restlet.ext.servlet.ServletCall.<init>(ServletCall
> .java:70)
>       
> com.noelios.restlet.ext.servlet.ServerServlet.service(ServerSe
> rvlet.java:119)
>       javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> 
> 
> 
> The code line is:
> 
>    setServerProtocol(server.getProtocols().get(0)); // 
> Assumes that server
> connectors support only one protocol
> 
> 
> when guarding the line with a test for 'null', everything 
> works just fine.
> 
>   if ((server.getProtocols() != null) && 
>       (server.getProtocols().size() > 0)) {
>     setServerProtocol(server.getProtocols().get(0)); // 
> Assumes that server
> connectors support only one protocol
>   } else {
>     setServerProtocol(null);
>   }
> 
> 
> Is this a bug, or did i forgot to initialize something?
> 
> 
> Ciao,
>   Steffen
> 

Reply via email to