Ensure constants are declared as immutable collections
This communicates important semantic guarantees to callers, as described in the ImmutableCollection javadoc. It also makes calls to mutating methods result in compiler warnings. PiperOrigin-RevId: 149238269 PiperOrigin-RevId: 148972127 PiperOrigin-RevId: 149233478 PiperOrigin-RevId: 149235768 Change-Id: I6d3de40810c83aaa258c6b93a24a3f9fd18994e8
This commit is contained in:
@@ -71,7 +71,8 @@ import org.eclipse.jgit.util.RawParseUtils;
|
||||
*/
|
||||
@Singleton
|
||||
public class RulesCache {
|
||||
private static final List<String> PACKAGE_LIST = ImmutableList.of(Prolog.BUILTIN, "gerrit");
|
||||
private static final ImmutableList<String> PACKAGE_LIST =
|
||||
ImmutableList.of(Prolog.BUILTIN, "gerrit");
|
||||
|
||||
private static final class MachineRef extends WeakReference<PrologMachineCopy> {
|
||||
final ObjectId key;
|
||||
|
||||
Reference in New Issue
Block a user