Menu

#1226 False Positive: UnusedPrivateMethod overloading with varargs

PMD-5.1.2
closed
None
PMD
3-Major
Bug
5.1.1
2014-11-25
2014-07-17
Bryan
No

PMD flags a method being used, but doesn't flag the method not being used, but is using varargs as a parameter if both have the same name.

private String s;

public Foo() {
    s = "Foobar";
}

//This method isn't flagged
private void bar(int... n)
{
}

//This method is flagged
private void bar(String s)
{
}

public void dummyMethod() {
    bar(s);
}

Related

Issues: #1276
Issues: #1278

Discussion

  • Andreas Dangel

    Andreas Dangel - 2014-07-20
    • status: open --> closed
    • assigned_to: Andreas Dangel
    • Milestone: New Tickets --> PMD-Next
     
  • Andreas Dangel

    Andreas Dangel - 2014-07-20

    Will be fixed with the next release.

     

Log in to post a comment.