Author: nextgens
Date: 2007-03-23 22:44:49 +0000 (Fri, 23 Mar 2007)
New Revision: 12290

Modified:
   trunk/freenet/src/freenet/client/StandardOnionFECCodec.java
Log:
cosmetic: Move variables at the top of the class (readability concerns)

Modified: trunk/freenet/src/freenet/client/StandardOnionFECCodec.java
===================================================================
--- trunk/freenet/src/freenet/client/StandardOnionFECCodec.java 2007-03-23 
20:50:15 UTC (rev 12289)
+++ trunk/freenet/src/freenet/client/StandardOnionFECCodec.java 2007-03-23 
22:44:49 UTC (rev 12290)
@@ -30,7 +30,7 @@
        // REDFLAG: Optimal stripe size? Smaller => less memory usage, but more 
JNI overhead
        private static int STRIPE_SIZE = 4096;
        private static int PARALLEL_DECODES;
-       
+
        static {
                int nbAvailableProcessors = 
Runtime.getRuntime().availableProcessors();
                if(nbAvailableProcessors > 1)
@@ -39,6 +39,17 @@
                        PARALLEL_DECODES = 1;
        }

+       static boolean noNative;
+
+       private static final LRUHashtable recentlyUsedCodecs = new 
LRUHashtable();
+       private static final Object runningDecodesSync = new Object();
+       private static int runningDecodes;
+
+       private final FECCode encoder;
+       private final FECCode decoder;
+       private final int k;
+       private final int n;
+       
        private static class MyKey {
                /** Number of input blocks */
                int k;
@@ -62,8 +73,6 @@
                }
        }

-       private final static LRUHashtable recentlyUsedCodecs = new 
LRUHashtable();
-       
        public synchronized static FECCodec getInstance(int dataBlocks, int 
checkBlocks) {
                MyKey key = new MyKey(dataBlocks, checkBlocks + dataBlocks);
                StandardOnionFECCodec codec = (StandardOnionFECCodec) 
recentlyUsedCodecs.get(key);
@@ -79,14 +88,6 @@
                return codec;
        }

-       private final FECCode encoder;
-       private final FECCode decoder;
-
-       private final int k;
-       private final int n;
-       
-       static boolean noNative;
-       
        public StandardOnionFECCodec(int k, int n) {
                this.k = k;
                this.n = n;
@@ -118,9 +119,6 @@
                logMINOR = Logger.shouldLog(Logger.MINOR, this);
        }

-       private static final Object runningDecodesSync = new Object();
-       private static int runningDecodes;
-
        public void decode(SplitfileBlock[] dataBlockStatus, SplitfileBlock[] 
checkBlockStatus, int blockLength, BucketFactory bf) throws IOException {
                logMINOR = Logger.shouldLog(Logger.MINOR, getClass());
                if(logMINOR) 


Reply via email to