Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin does not recognize @Consume endpoints #921

Open
duydao opened this issue Oct 3, 2023 · 3 comments
Open

Plugin does not recognize @Consume endpoints #921

duydao opened this issue Oct 3, 2023 · 3 comments
Labels

Comments

@duydao
Copy link

duydao commented Oct 3, 2023

IntelliJ keeps telling me that my direct endpoint does not exist when using the .to() component.

This will show an error marker "Cannot find endpoint declaration":

@Consume("direct:target")
public void doSomething() {}

public void test() {
  from("direct:source").to("direct:target")
}

Do we have a workaround for this or is it the expected behaviour?

@duydao
Copy link
Author

duydao commented Oct 3, 2023

Using a variable instead of a string literal removes the error marker.

@davsclaus
Copy link
Collaborator

Ah thanks for reporting - yeah it would be better if the plugin could detect the uri in @Consume also. The plugin mainly detects in RouteBuilders and the other DSLs. But for Java code then URIs can be specified in annotations such as @Consume and @Produce.

@davsclaus davsclaus added the bug label Oct 4, 2023
@davsclaus
Copy link
Collaborator

@ammachado you are welcome to look at this too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants