/* * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ package codetoanalyze.java.checkers; import com.google.common.collect.ImmutableList; import java.util.ArrayList; import java.util.List; public class ImmutableCast { ImmutableList immutableList = ImmutableList.of("a", "b", "c"); List badCastFromField() { return immutableList; } List badCast(ImmutableList list) { return list; } List goodCast(ImmutableList list) { return new ArrayList(list); } }