#1464 [java] UnnecessaryFinalModifier: false positive on a @SafeVarargs method

PMD-5.3.7
closed
java (55)
PMD
3-Major
Bug
5.3.5
UnnecessaryFinalModifier
2016-06-25
2016-02-25
No

It fails here. Removal of final modifier from a @SafeVarargs method breaks compilation, so this rule should ignore @SafeVarargs methods.

public final class InboxContents<T> {
    @SafeVarargs
    public final InboxContents<T> conflateWith(T... values) { // false positive
        return conflateWith(ImmutableList.copyOf(values));
    }
}

Discussion

  • Andreas Dangel

    Andreas Dangel - 2016-02-28
    • status: open --> closed
    • assigned_to: Andreas Dangel
    • Milestone: New Tickets --> PMD-5.3.7
     
  • Alexey Yudichev

    Alexey Yudichev - 2016-02-29

    I can see two 5.3 and 5.4 versions of PDM in the maven central. Will it be fixed in 5.4.2 too?

     
  • Andreas Dangel

    Andreas Dangel - 2016-06-25
    • labels: --> java
    • summary: UnnecessaryFinalModifier false positive on a @SafeVarargs method --> [java] UnnecessaryFinalModifier: false positive on a @SafeVarargs method
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks