[freenet-cvs] r19697 - trunk/freenet/src/freenet/support/io
nextgens at freenetproject.org
nextgens at freenetproject.org
Sat May 3 13:40:26 UTC 2008
Author: nextgens
Date: 2008-05-03 13:40:26 +0000 (Sat, 03 May 2008)
New Revision: 19697
Modified:
trunk/freenet/src/freenet/support/io/PaddedEphemerallyEncryptedBucket.java
Log:
cheap optimization
Modified: trunk/freenet/src/freenet/support/io/PaddedEphemerallyEncryptedBucket.java
===================================================================
--- trunk/freenet/src/freenet/support/io/PaddedEphemerallyEncryptedBucket.java 2008-05-03 13:25:08 UTC (rev 19696)
+++ trunk/freenet/src/freenet/support/io/PaddedEphemerallyEncryptedBucket.java 2008-05-03 13:40:26 UTC (rev 19697)
@@ -154,6 +154,7 @@
if(closed) throw new IOException("Already closed!");
if(streamNumber != lastOutputStream)
throw new IllegalStateException("Writing to old stream in "+getName());
+ if(length == 0) return;
byte[] enc = new byte[length];
System.arraycopy(buf, offset, enc, 0, length);
pcfb.blockEncipher(enc, 0, enc.length);
More information about the cvs
mailing list