Make a member field final wherever possible
This commit is contained in:
parent
4dce19b814
commit
9746bb2036
@ -30,9 +30,9 @@ public class DiskAttribute extends AbstractDiskHttpData implements Attribute {
|
|||||||
|
|
||||||
public static boolean deleteOnExitTemporaryFile = true;
|
public static boolean deleteOnExitTemporaryFile = true;
|
||||||
|
|
||||||
public static String prefix = "Attr_";
|
public static final String prefix = "Attr_";
|
||||||
|
|
||||||
public static String postfix = ".att";
|
public static final String postfix = ".att";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor used for huge Attribute
|
* Constructor used for huge Attribute
|
||||||
|
@ -28,9 +28,9 @@ public class DiskFileUpload extends AbstractDiskHttpData implements FileUpload {
|
|||||||
|
|
||||||
public static boolean deleteOnExitTemporaryFile = true;
|
public static boolean deleteOnExitTemporaryFile = true;
|
||||||
|
|
||||||
public static String prefix = "FUp_";
|
public static final String prefix = "FUp_";
|
||||||
|
|
||||||
public static String postfix = ".tmp";
|
public static final String postfix = ".tmp";
|
||||||
|
|
||||||
private String filename;
|
private String filename;
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ import java.nio.charset.Charset;
|
|||||||
*/
|
*/
|
||||||
final class HttpPostBodyUtil {
|
final class HttpPostBodyUtil {
|
||||||
|
|
||||||
public static int chunkSize = 8096;
|
public static final int chunkSize = 8096;
|
||||||
/**
|
/**
|
||||||
* HTTP content disposition header name.
|
* HTTP content disposition header name.
|
||||||
*/
|
*/
|
||||||
|
@ -23,7 +23,7 @@ import java.util.List;
|
|||||||
* (like Multipart Mixed mode)
|
* (like Multipart Mixed mode)
|
||||||
*/
|
*/
|
||||||
public class InternalAttribute implements InterfaceHttpData {
|
public class InternalAttribute implements InterfaceHttpData {
|
||||||
protected List<String> value = new ArrayList<String>();
|
protected final List<String> value = new ArrayList<String>();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public HttpDataType getHttpDataType() {
|
public HttpDataType getHttpDataType() {
|
||||||
|
@ -194,22 +194,22 @@ final class Deflate {
|
|||||||
int good_match;
|
int good_match;
|
||||||
// Stop searching when current match exceeds this
|
// Stop searching when current match exceeds this
|
||||||
int nice_match;
|
int nice_match;
|
||||||
short[] dyn_ltree; // literal and length tree
|
final short[] dyn_ltree; // literal and length tree
|
||||||
short[] dyn_dtree; // distance tree
|
final short[] dyn_dtree; // distance tree
|
||||||
short[] bl_tree; // Huffman tree for bit lengths
|
final short[] bl_tree; // Huffman tree for bit lengths
|
||||||
Tree l_desc = new Tree(); // desc for literal tree
|
final Tree l_desc = new Tree(); // desc for literal tree
|
||||||
Tree d_desc = new Tree(); // desc for distance tree
|
final Tree d_desc = new Tree(); // desc for distance tree
|
||||||
Tree bl_desc = new Tree(); // desc for bit length tree
|
final Tree bl_desc = new Tree(); // desc for bit length tree
|
||||||
// number of codes at each bit length for an optimal tree
|
// number of codes at each bit length for an optimal tree
|
||||||
short[] bl_count = new short[JZlib.MAX_BITS + 1];
|
final short[] bl_count = new short[JZlib.MAX_BITS + 1];
|
||||||
// heap used to build the Huffman trees
|
// heap used to build the Huffman trees
|
||||||
int[] heap = new int[2 * JZlib.L_CODES + 1];
|
final int[] heap = new int[2 * JZlib.L_CODES + 1];
|
||||||
int heap_len; // number of elements in the heap
|
int heap_len; // number of elements in the heap
|
||||||
int heap_max; // element of largest frequency
|
int heap_max; // element of largest frequency
|
||||||
// The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.
|
// The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.
|
||||||
// The same heap array is used to build all trees.
|
// The same heap array is used to build all trees.
|
||||||
// Depth of each subtree used as tie breaker for trees of equal frequency
|
// Depth of each subtree used as tie breaker for trees of equal frequency
|
||||||
byte[] depth = new byte[2 * JZlib.L_CODES + 1];
|
final byte[] depth = new byte[2 * JZlib.L_CODES + 1];
|
||||||
int l_buf; // index for literals or lengths */
|
int l_buf; // index for literals or lengths */
|
||||||
// Size of match buffer for literals/lengths. There are 4 reasons for
|
// Size of match buffer for literals/lengths. There are 4 reasons for
|
||||||
// limiting lit_bufsize to 64K:
|
// limiting lit_bufsize to 64K:
|
||||||
|
@ -131,7 +131,7 @@ public class LocalTransportThreadModelTest2 {
|
|||||||
|
|
||||||
public volatile ChannelFuture lastWriteFuture;
|
public volatile ChannelFuture lastWriteFuture;
|
||||||
|
|
||||||
public AtomicInteger count = new AtomicInteger(0);
|
public final AtomicInteger count = new AtomicInteger(0);
|
||||||
|
|
||||||
public LocalHander(String name) {
|
public LocalHander(String name) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
|
Loading…
Reference in New Issue
Block a user