There are several other SO questions talking about generics compiling OK w/ Eclipse\'s compiler but not javac (i.e. Java: Generics handled differenlty in Eclipse and javac a
Perhaps it is because you've declared E as something that extends Enum
public > void postEvent(E code)
{
if (code instanceof LogEvent.Type)
{
LogEvent.Type scode = (LogEvent.Type)code;
...
}
...
This works and it is more elegant than just casting to an Object.