At Don't break the build on source incompatibilities - #3 by acotiuga we discussed about not breaking in source incompatibilities.
Here’s an example of changes I did in xwiki-commons that raised it:
[ERROR] java.generics.elementNowParameterized: method <T> java.util.List<org.xwiki.component.descriptor.ComponentDescriptor<T>> org.xwiki.component.annotation.ComponentDescriptorFactory::createComponentDescriptors(java.lang.Class<? extends T>, java.lang.Class<?>): Element now defines formal type parameters.
[ERROR] java.generics.elementNowParameterized: method <T> java.util.List<org.xwiki.component.descriptor.ComponentDescriptor<T>> org.xwiki.component.annotation.ComponentDescriptorFactory::createComponentDescriptors(java.lang.Class<? extends T>, java.lang.reflect.Type): Element now defines formal type parameters.
Or in full XML syntax:
<item>
<code>java.generics.elementNowParameterized</code>
<old>method java.util.List<org.xwiki.component.descriptor.ComponentDescriptor> org.xwiki.component.annotation.ComponentDescriptorFactory::createComponentDescriptors(java.lang.Class<?>, java.lang.Class<?>)</old>
<new>method <T> java.util.List<org.xwiki.component.descriptor.ComponentDescriptor<T>> org.xwiki.component.annotation.ComponentDescriptorFactory::createComponentDescriptors(java.lang.Class<? extends T>, java.lang.Class<?>)</new>
<justification>ADD YOUR EXPLANATION FOR THE NECESSITY OF THIS CHANGE</justification>
</item><item>
<code>java.generics.elementNowParameterized</code>
<old>method java.util.List<org.xwiki.component.descriptor.ComponentDescriptor> org.xwiki.component.annotation.ComponentDescriptorFactory::createComponentDescriptors(java.lang.Class<?>, java.lang.reflect.Type)</old>
<new>method <T> java.util.List<org.xwiki.component.descriptor.ComponentDescriptor<T>> org.xwiki.component.annotation.ComponentDescriptorFactory::createComponentDescriptors(java.lang.Class<? extends T>, java.lang.reflect.Type)</new>
<justification>ADD YOUR EXPLANATION FOR THE NECESSITY OF THIS CHANGE</justification>
</item>
Basically it was missing the generic in the returned ComponentDescriptor and the relationship between the type of the returned ComponentDescriptor and the passed Class type.
WDYT?
Thanks