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

Annotation attributes have no default value #423

Closed
lombokissues opened this issue Jul 14, 2015 · 5 comments
Closed

Annotation attributes have no default value #423

lombokissues opened this issue Jul 14, 2015 · 5 comments
Assignees
Milestone

Comments

@lombokissues
Copy link

Migrated from Google Code (issue 350)

@lombokissues
Copy link
Author

👤 mayham17   🕗 Mar 01, 2012 at 11:21 UTC

What steps will reproduce the problem?

When I add an inner annotation class inside a lombokized class the default values for the annotations attributes are not generated on delombok (for Javac)

What is the expected output? What do you see instead?

***** AnotationDefault.java *****
Difference in AnotationDefault.java on line 3 expected:< int bar()[ default 7];> but was:< int bar()[];>
**** Expected ******
class AnnotationDefault {

@ interface Foo {
    int bar() default 7;
}

}

**** Actual ******
// Generated by delombok at Thu Mar 01 12:13:33 CET 2012

class AnnotationDefault {

@ interface Foo {

    int bar();
}

}


What version of the product are you using? On what operating system?
>Source code as of Feb 28 2012
>MS Windows 7

Proposed patch: Add the following lines in PrettyCommentsPrinter.java after line 779:

> } else if (tree.defaultValue != null) {
> print(" default ");
> print(tree.defaultValue);
> print(";");

@lombokissues
Copy link
Author

👤 grootjans   🕗 Mar 05, 2012 at 19:12 UTC

@lombokissues lombokissues added the accepted The issue/enhancement is valid, sensible, and explained in sufficient detail label Jul 14, 2015
@lombokissues lombokissues added this to the 0.10.9 milestone Jul 14, 2015
@lombokissues
Copy link
Author

👤 grootjans   🕗 Mar 05, 2012 at 19:12 UTC

@lombokissues
Copy link
Author

👤 grootjans   🕗 Mar 05, 2012 at 22:48 UTC

@lombokissues lombokissues assigned rspilker and unassigned grootjans Jul 14, 2015
@lombokissues lombokissues removed the accepted The issue/enhancement is valid, sensible, and explained in sufficient detail label Jul 14, 2015
@lombokissues
Copy link
Author

End of migration

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

No branches or pull requests

3 participants