File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
marker/jvm-marker/src/main/kotlin/spp/jetbrains/marker/jvm/detect/endpoint Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -67,7 +67,11 @@ class SkywalkingTraceEndpoint : JVMEndpointNameDetector {
6767 override fun determineEndpointName (element : KtNamedFunction ): Future <List <DetectedEndpoint >> {
6868 val promise = Promise .promise<List <DetectedEndpoint >>()
6969 DumbService .getInstance(element.project).runReadActionInSmartMode {
70- val annotation = element.findAnnotation(FqName (skywalkingTraceAnnotation))
70+ val annotation = try {
71+ element.findAnnotation(FqName (skywalkingTraceAnnotation))
72+ } catch (ignored: Exception ) {
73+ null
74+ }
7175 if (annotation != null ) {
7276 val operationNameExpr = getAttributeValue(annotation, " operationName" )
7377 val value = if (operationNameExpr is KtStringTemplateExpression ) {
Original file line number Diff line number Diff line change @@ -80,7 +80,11 @@ class SpringMVCEndpoint : JVMEndpointNameDetector {
8080 val promise = Promise .promise<List <DetectedEndpoint >>()
8181 ApplicationManager .getApplication().runReadAction {
8282 for (annotationName in qualifiedNameSet) {
83- val annotation = element.findAnnotation(FqName (annotationName))
83+ val annotation = try {
84+ element.findAnnotation(FqName (annotationName))
85+ } catch (ignored: Exception ) {
86+ null
87+ }
8488 if (annotation != null ) {
8589 val detectedEndpoint = handleAnnotation(false , annotation, annotationName)
8690 val classRequestMapping = element.containingClass()
You can’t perform that action at this time.
0 commit comments