PriorityBlockingQueue
already has a method poll()
with a generic return type. You cannot override a method and change its return type to some incompatible type, see the JLS section for method overrides and the section for method return types return-type-substitutable
.
In your case, PriorityBlockingQueue<FIFOEntry<JobSet>>
would expect poll()
to return FIFOEntry<JobSet>
.