javac has a bug in which the upper bound of a capture variable is used for inference, rather than the capture variable itself. This allows the following incorrect code, from jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/DefaultResourceInjector.java, to compile without error:
InjectionPlan.buildInjectionPlan(instance.getClass(),WebServiceContext.class,false)
.inject(instance,context)
(javac infers T=Object for 'buildInjectionPlan', when it should infer T=capturevar)
When the javac bug gets fixed, this code will no longer compile. So this bug blocks the javac bug fix.
Suggested fix:
InjectionPlan.<Object>buildInjectionPlan(instance.getClass(),WebServiceContext.class,false)
.inject(instance,context)