Author: nextgens
Date: 2008-11-16 22:33:31 +0000 (Sun, 16 Nov 2008)
New Revision: 23666

Modified:
   trunk/freenet/src/freenet/client/ArchiveManager.java
Log:
better this way

Modified: trunk/freenet/src/freenet/client/ArchiveManager.java
===================================================================
--- trunk/freenet/src/freenet/client/ArchiveManager.java        2008-11-16 
22:22:55 UTC (rev 23665)
+++ trunk/freenet/src/freenet/client/ArchiveManager.java        2008-11-16 
22:33:31 UTC (rev 23666)
@@ -235,8 +235,8 @@
                if(logMINOR) Logger.minor(this, "Extracting "+key);
                ctx.onExtract();
                ctx.removeAllCachedItems(); // flush cache anyway
-               long expectedSize = ctx.getLastSize();
-               long archiveSize = data.size();
+               final long expectedSize = ctx.getLastSize();
+               final long archiveSize = data.size();
                /** Set if we need to throw a RestartedException rather than 
returning success,
                 * after we have unpacked everything.
                 */
@@ -258,13 +258,12 @@
                        ctx.setLastHash(realHash);
                }
                
-               long dataSize = data.size();
-               if(dataSize > archiveContext.maxArchiveSize)
-                       throw new ArchiveFailureException("Archive too big 
("+dataSize+" > "+archiveContext.maxArchiveSize+")!");
-               else if(dataSize <= 0)
-                       throw new ArchiveFailureException("Archive too small! 
("+dataSize+')');
+               if(archiveSize > archiveContext.maxArchiveSize)
+                       throw new ArchiveFailureException("Archive too big 
("+archiveSize+" > "+archiveContext.maxArchiveSize+")!");
+               else if(archiveSize <= 0)
+                       throw new ArchiveFailureException("Archive too small! 
("+archiveSize+')');
                else if(logMINOR)
-                       Logger.minor(this, "Container size (possibly 
compressed): "+data.size()+" for "+data);
+                       Logger.minor(this, "Container size (possibly 
compressed): "+archiveSize+" for "+data);
                
                
                InputStream is = null;

_______________________________________________
cvs mailing list
[email protected]
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs

Reply via email to