Skip to content

AnnotationScannerUtil skips annotated overloads of typical Java methods due to name-based filtering #1523

@risingcult

Description

@risingcult

Describe the bug
AnnotationScannerUtil filters methods by “typical” Java names (notify, wait, etc.) without checking signatures. Annotated overloads like notify(String) or
wait(String) are skipped, so annotated listeners/publishers with these names are not discovered and won’t appear in AsyncAPI generation.

Dependencies and versions used

  • springwolf-core version 1.19.0

Code example

@Component
  class NotificationPublisher {

      @AsyncPublisher(channelName = "notifications")
      public void notify(String message) {
          // publish a notification
      }
  }

  // Invoking:
  var methods = AnnotationScannerUtil.findAnnotatedMethods(
          NotificationPublisher.class, AsyncPublisher.class
  ).toList();

  // Actual: notify(String) is skipped because of name-based filtering.
  // Expected: notify(String) is returned.

Stack trace and error logs

No exception, the annotated overloads are silently filtered out

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions