<html><head></head><body bgcolor='#FFFFFF' 
style='font-size:12px;background-color:#FFFFFF;font-family:Verdana, Arial, 
sans-serif;'>Hi Thierry, hi Tom, hi committers,<br/><br/>I've took a look into 
he sourcecode via tigris and browser directly, and found the following 
source<br/><pre><span class="vcmarkup-keyword">if</span> (index != -1) 
{
    <span class="vcmarkup-keyword">int</span> startIndex = 
Integer.parseInt(value.substring(0, index));
    <span class="vcmarkup-keyword">int</span> endIndex = 
Integer.parseInt(value.substring(index + 1, index1));
    representation.setRange(<span class="vcmarkup-keyword">new</span> 
Range(startIndex, endIndex - startIndex + 1)); !!!!!!!!!!!!!!!!!
}</pre>The line marked with !!!!!!!!!!!! 
is<br/><pre>representation.setRange(<span class="vcmarkup-keyword">new</span> 
Range(<strong>(long)</strong>startIndex, <strong>(long)</strong>endIndex - 
startIndex + 1));</pre>because the Range constructor parameters are declared as 
long. So please 
change&nbsp;<pre>Integer.parseInt</pre>to<br/><pre>long.parseLong</pre>two 
times. Tom will thank you very much. :-)<br/>(I have no up to date workspace, 
so that I have to fully set up a new one).<br/><br/>best 
regards<br/>&nbsp;&nbsp; Stephan<br/><br/>-----Urspr&uuml;ngliche 
Nachricht-----<br/>Von: &quot;Stephan Koops&quot; 
&lt;[email protected]&gt;<br/>Gesendet: 19.05.2011 17:45:04<br/>An: 
[email protected]<br/>Betreff: Re: Issue with Range<br/><br/>&gt;Hello 
Tom,<br/>&gt;<br/>&gt;&gt;3980273410 is the size of the file that i'm trying to 
transfer. actually its<br/>&gt;&gt;the index of the last byte of the file. all 
of my variables are declared as<br/>&gt;&gt;long -- the catalina stack trace 
shows:<br/>&gt;&gt;<br/>&gt;&gt; 
at<br/>&gt;&gt;java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)<br/>&gt;&gt;
 at java.lang.Integer.parseInt(Integer.java:461)<br/>&gt;&gt; at 
java.lang.Integer.parseInt(Integer.java:499)<br/>&gt;&gt; at 
org.restlet.engine.http.header.RangeReader.update(RangeReader.java:65)<br/>&gt;<br/>&gt;This
 StackTrace shows, that it is an int here (parseInt() ). You have to look in 
the source code, what happens here (I haven't the current code here), which 
value is parsed. Maybe you could have luck, that parseInt is a bug and should 
be parseLong. Class org.restlet.data.Range has long 
attributes.<br/>&gt;<br/>&gt;best regards<br/>&gt;&nbsp;&nbsp;&nbsp; 
Stephan<br/>&gt;<br/>&gt;___________________________________________________________<br/>&gt;Schon
 geh&ouml;rt? WEB.DE hat einen genialen Phishing-Filter in die<br/>&gt;Toolbar 
eingebaut! 
http://produkte.web.de/go/toolbar<br/>&gt;<br/>&gt;------------------------------------------------------<br/>&gt;http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&amp;dsMessageId=2741411&nbsp;&nbsp;<br><br><table
 cellpadding="0" cellspacing="0" border="0"><tr><td bgcolor="#000000"><img 
src="https://img.ui-portal.de/p.gif"; width="1" height="1" border="0" alt="" 
/></td></tr><tr><td style="font-family:verdana; font-size:12px; 
line-height:17px;">Schon geh&ouml;rt? WEB.DE hat einen genialen Phishing-Filter 
in die&nbsp;&nbsp;&nbsp;<br>Toolbar eingebaut! <a 
href="http://produkte.web.de/go/toolbar";><b>http://produkte.web.de/go/toolbar</b></a></td></tr></table>
</body></html>

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

Reply via email to