private CdiSpiHelper() {
}
static <T extends Annotation> T getQualifierByType(InjectionPoint ip, Class<T> type) {
return getFirstElementOfType(ip.getQualifiers(), type);
}
<BUG>private static <E, T extends E> T getFirstElementOfType(Collection<E> collection, Class<T> type) {
for (E item : collection) {</BUG>
if ((item != null) && type.isAssignableFrom(item.getClass())) {
return ObjectHelper.cast(type, item);
}

private CdiSpiHelper() {
}
static <T extends Annotation> T getQualifierByType(InjectionPoint ip, Class<T> type) {
return getFirstElementOfType(ip.getQualifiers(), type);
}
static <E, T extends E> T getFirstElementOfType(Collection<E> collection, Class<T> type) {
for (E item : collection) {
if ((item != null) && type.isAssignableFrom(item.getClass())) {
return ObjectHelper.cast(type, item);
