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

jooby-apt: Value annotation attribute must be always generated #3539

Closed
jknack opened this issue Sep 23, 2024 · 0 comments
Closed

jooby-apt: Value annotation attribute must be always generated #3539

jknack opened this issue Sep 23, 2024 · 0 comments

Comments

@jknack
Copy link
Member

jknack commented Sep 23, 2024

Given:

@Target({ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
public @interface Secured {
    boolean value() default true;
}

With:

class Controller {
   @GET
   @Secured
   public String secured() {
     ///
   } 
}

Generates:

app.get("/", this::secured);

The bug was introduced in #3526. Affected version is: 3.4.0 it worked in 3.3.1 (previous releases).

Must generates:

app.get("/", this::secured)
   .setAttributes(java.util.Map.of("Secured", true));
@jknack jknack added this to the 3.4.1 milestone Sep 23, 2024
@jknack jknack closed this as completed in fa783eb Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant