import java.util.*; import lombok.val; public class ValOutersWithGenerics { class Inner { Inner() { super(); } } static class SubClass extends ValOutersWithGenerics { SubClass() { super(); } public void testSubClassOfOutersWithGenerics() { List list = new ArrayList(); final ValOutersWithGenerics.Inner elem = list.get(0); } } public ValOutersWithGenerics() { super(); } public void testOutersWithGenerics() { List list = new ArrayList(); final ValOutersWithGenerics.Inner elem = list.get(0); } }