void (final String[] args) { List<ValueHolder<?>> multiList = new ArrayList<ValueHolder<?>>(); ValueHolder<Integer> intHolder = new ValueHolder<Integer>(); intHolder.value = 1; ValueHolder<Double> doubleHolder = new ValueHolder<Double>(); doubleHolder.value = 1.5; multiList.add(intHolder); multiList.add(doubleHolder); swapFirstTwoValues<error descr="'swapFirstTwoValues(java.util.List<TypeBug.ValueHolder<T>>)' in 'TypeBug' cannot be applied to '(java.util.List<TypeBug.ValueHolder<?>>)'">(multiList)</error>; //need to be highlighted // this line causes a ClassCastException when checked. Integer value = intHolder.value; System.out.println(value); }