forked from I2P_Developers/i2p.i2p
2005-01-11 jrandom
* Include the attachments/blogs/etc for comments on the blog view * Syndie HTML fixes (thanks cervantes!) * Make sure we fully reset the objects going into our cache before we reuse them (thanks zzz!)
This commit is contained in:
@ -77,7 +77,10 @@ public final class ByteCache {
|
||||
}
|
||||
_lastOverflow = System.currentTimeMillis();
|
||||
byte data[] = new byte[_entrySize];
|
||||
return new ByteArray(data);
|
||||
ByteArray rv = new ByteArray(data);
|
||||
rv.setValid(0);
|
||||
rv.setOffset(0);
|
||||
return rv;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -92,6 +95,9 @@ public final class ByteCache {
|
||||
if ( (entry == null) || (entry.getData() == null) )
|
||||
return;
|
||||
|
||||
entry.setValid(0);
|
||||
entry.setOffset(0);
|
||||
|
||||
if (shouldZero)
|
||||
Arrays.fill(entry.getData(), (byte)0x0);
|
||||
synchronized (_available) {
|
||||
|
Reference in New Issue
Block a user