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

JavadocLocationCheck false positive empty line #1059

Open
golszewski86 opened this issue Oct 18, 2019 · 2 comments
Open

JavadocLocationCheck false positive empty line #1059

golszewski86 opened this issue Oct 18, 2019 · 2 comments

Comments

@golszewski86
Copy link

The following class:

package foo;

import org.takes.Request;
import org.takes.Response;
import org.takes.Take;
import org.takes.rs.RsText;

/**
 * Test.
 * @since 1.0
 */
public final class EmptyLineError implements Take {

    /**
     * Some enum.
     *
     * @since 1.0
     */
    private enum SomeEnum {

        /**
         * Foo.
         */
        FOO,

        /**
         * Bar.
         */
        BAR;
    }

    @Override
    public Response act(final Request req) {
        return new RsText(SomeEnum.FOO.name());
    }
}

Triggers qulice errors:

[INFO] Checkstyle: src/main/java/foo/EmptyLineError.java[29]: Empty line between javadoc and subject (JavadocLocationCheck)
[INFO] Checkstyle: src/main/java/foo/EmptyLineError.java[30]: Empty line between javadoc and subject (JavadocLocationCheck)
[INFO] Checkstyle: src/main/java/foo/EmptyLineError.java[31]: Empty line between javadoc and subject (JavadocLocationCheck)

The line 31 is just above the @Override annotation, however:

  • There are no 3 empty lines reported by qulice,
  • There should be no javadoc for method act because it is inherited from interface org.takes.Take.

Hence, errors are false positives.

Placing the whole enum below act method is a workaround to clean those errors.

@0crat
Copy link
Collaborator

0crat commented Oct 18, 2019

@krzyk/z please, pay attention to this issue

@0crat
Copy link
Collaborator

0crat commented Oct 18, 2019

@golszewski86/z this project will fix the problem faster if you donate a few dollars to it; just click here and pay via Stripe, it's very fast, convenient and appreciated; thanks a lot!

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

2 participants