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

Wrong JavaDoc with invalid syntax #1018

Vampire opened this issue Aug 28, 2019 · 0 comments


Copy link

commented Aug 28, 2019

The JavaDoc show invalid examples and should be reviewed for errors.
For example in MockingApi the Mock and Stub methods use leftshift for defining return values instead of rightshift:

// type is Person.class, name is "person", returns hard-coded values for property {@code name} and method {@code sing()}
Person person = Stub {
  name << "Fred"
  sing() << "Tra-la-la"

Also would name >> "Fred" be valid?
Because I tried to do it like that and got No such property: author for class: net.kautler.command.api.restriction.javacord.BotOwnerJavacordTest

I also tried, in which case I get no error, but the call is not recorded at all.
Same with delegate.getName().
(I tried to make CodeNarc happy which checks that you use property syntax if you can and it doesn't recognize that you cannot there which might actually be a bug)

Update: Aah, works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
1 participant
You can’t perform that action at this time.