Use Immutable types for static final fields

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=149172966
This commit is contained in:
Ben McIlwain 2017-03-03 17:38:46 -08:00
parent 034312c17d
commit 2bba5660c2
4 changed files with 28 additions and 27 deletions

View file

@ -23,7 +23,6 @@ import com.google.common.collect.ImmutableMap;
import java.io.UnsupportedEncodingException;
import java.net.URI;
import java.net.URLEncoder;
import java.util.Map;
import java.util.Objects;
import javax.annotation.Nullable;
import javax.annotation.concurrent.Immutable;
@ -41,7 +40,8 @@ import javax.annotation.concurrent.Immutable;
final class RdeUploadUrl implements Comparable<RdeUploadUrl> {
public static final Protocol SFTP = new Protocol("sftp", 22);
private static final Map<String, Protocol> ALLOWED_PROTOCOLS = ImmutableMap.of("sftp", SFTP);
private static final ImmutableMap<String, Protocol> ALLOWED_PROTOCOLS =
ImmutableMap.of("sftp", SFTP);
private final Protocol protocol;
private final URI uri;