Make compilation work in Eclipse 2019.03 again by working around a limitation of the Eclipse Java Compiler regarding casting/generics