File tree 1 file changed +4
-2
lines changed
src/main/java/org/codehaus/plexus/util/xml/pull
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -401,9 +401,11 @@ protected void ensureEntityCapacity()
401
401
protected int bufLoadFactor = 95 ; // 99%
402
402
// protected int bufHardLimit; // only matters when expanding
403
403
404
+ protected float bufferLoadFactor = bufLoadFactor / 100f ;
405
+
404
406
protected char buf [] = new char [Runtime .getRuntime ().freeMemory () > 1000000L ? READ_CHUNK_SIZE : 256 ];
405
407
406
- protected int bufSoftLimit = ( bufLoadFactor * buf .length ) / 100 ; // desirable size of buffer
408
+ protected int bufSoftLimit = (int ) ( bufferLoadFactor * buf .length ) ; // desirable size of buffer
407
409
408
410
protected boolean preventBufferCompaction ;
409
411
@@ -3657,7 +3659,7 @@ else if ( expand )
3657
3659
if ( bufLoadFactor > 0 )
3658
3660
{
3659
3661
// Include fix for https://web.archive.org/web/20070831191548/http://www.extreme.indiana.edu/bugzilla/show_bug.cgi?id=228
3660
- bufSoftLimit = (int ) (((( long ) bufLoadFactor ) * buf .length ) / 100 );
3662
+ bufSoftLimit = (int ) (bufferLoadFactor * buf .length );
3661
3663
}
3662
3664
3663
3665
}
You can’t perform that action at this time.
0 commit comments