Skip to content

Commit cbf8449

Browse files
authored
Merge pull request #30976 from manovotn/issue30965
Metrics - check if index contains class before attempting to use it
2 parents 82bdd68 + 3cb61b7 commit cbf8449

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

extensions/smallrye-metrics/deployment/src/main/java/io/quarkus/smallrye/metrics/deployment/jandex/JandexBeanInfoAdapter.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public BeanInfo convert(ClassInfo input) {
6868
private Stream<AnnotationInfo> getMetricAnnotationsThroughStereotype(AnnotationInstance stereotypeInstance,
6969
IndexView indexView) {
7070
ClassInfo annotationType = indexView.getClassByName(stereotypeInstance.name());
71-
if (annotationType.classAnnotation(DotNames.STEREOTYPE) != null) {
71+
if (annotationType != null && annotationType.declaredAnnotation(DotNames.STEREOTYPE) != null) {
7272
JandexAnnotationInfoAdapter adapter = new JandexAnnotationInfoAdapter(indexView);
7373
return transformedAnnotations.getAnnotations(annotationType)
7474
.stream()

0 commit comments

Comments
 (0)