#8285 - handle review comments
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
This commit is contained in:
parent
38d22f3153
commit
32ef1616e6
|
@ -204,13 +204,9 @@ public class CachingContentFactory implements HttpContent.ContentFactory
|
|||
super(httpContent);
|
||||
_etag = precalculatedEtag;
|
||||
_contentLengthValue = httpContent.getContentLengthValue(); // TODO getContentLengthValue() could return -1
|
||||
ByteBuffer byteBuffer = null;
|
||||
|
||||
if (_useFileMappedBuffer)
|
||||
{
|
||||
// map the content into memory
|
||||
byteBuffer = BufferUtil.toMappedBuffer(httpContent.getResource(), 0, _contentLengthValue);
|
||||
}
|
||||
// map the content into memory if possible
|
||||
ByteBuffer byteBuffer = _useFileMappedBuffer ? BufferUtil.toMappedBuffer(httpContent.getResource(), 0, _contentLengthValue) : null;
|
||||
|
||||
if (byteBuffer == null)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue