1
1
/*
2
- * Copyright (c) 2005, 2018 , Oracle and/or its affiliates. All rights reserved.
2
+ * Copyright (c) 2005, 2023 , Oracle and/or its affiliates. All rights reserved.
3
3
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
4
*
5
5
* This code is free software; you can redistribute it and/or modify it
@@ -49,7 +49,7 @@ class FileLockTable {
49
49
* FileLock (and FileChannel) alive.
50
50
*/
51
51
private static class FileLockReference extends WeakReference <FileLock > {
52
- private FileKey fileKey ;
52
+ private final FileKey fileKey ;
53
53
54
54
FileLockReference (FileLock referent ,
55
55
ReferenceQueue <FileLock > queue ,
@@ -66,11 +66,11 @@ FileKey fileKey() {
66
66
// The system-wide map is a ConcurrentHashMap that is keyed on the FileKey.
67
67
// The map value is a list of file locks represented by FileLockReferences.
68
68
// All access to the list must be synchronized on the list.
69
- private static ConcurrentHashMap <FileKey , List <FileLockReference >> lockMap =
70
- new ConcurrentHashMap <FileKey , List < FileLockReference > >();
69
+ private static final ConcurrentHashMap <FileKey , List <FileLockReference >> lockMap =
70
+ new ConcurrentHashMap <>();
71
71
72
72
// reference queue for cleared refs
73
- private static ReferenceQueue <FileLock > queue = new ReferenceQueue <FileLock >();
73
+ private static final ReferenceQueue <FileLock > queue = new ReferenceQueue <>();
74
74
75
75
// The connection to which this table is connected
76
76
private final Channel channel ;
0 commit comments