maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Phillip Hellewell <ssh...@gmail.com>
Subject Re: Heap overflow in deploy:deploy
Date Thu, 14 Oct 2010 12:19:26 GMT
On Wed, Oct 13, 2010 at 8:31 PM, Wayne Fay <waynefay@gmail.com> wrote:
>
> You probably want to look at the following lines in particular:
>
> 457         transfer( resource, input, output, requestType, Integer.MAX_VALUE );
> 480         int remaining = maxSize;
> //maxSize is Integer.MAX_VALUE
> 483             int n = input.read( buffer, 0, Math.min(
> buffer.length, remaining ) );
> //read in full file (up to Integer.MAX_VALUE in length) into buffer [memory]
> 492             output.write( buffer, 0, n );
> //then write it out
>
> So yes, it seems like it does read in the entire file into memory.

I don't know.  To me it looks like the code limits it to sending
DEFAULT_BUFFER_SIZE (4K) at a time.

Phillip

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message