Menu

#1327 Can't identify variable that is modified by this

New Tickets
more-info-needed
None
PMD
3-Major
Bug
5.2.3
2016-06-25
2015-03-30
xifei.cc
No
    private  HttpServletRequest request;

public void execute() throws IOException {
     String s = this.request.getParameter("test");
}

can not get the type of variable named request,even know the variable,so does a method that is modified by ’this‘

Discussion

  • Andreas Dangel

    Andreas Dangel - 2015-05-18
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,6 +1,7 @@
    -private  HttpServletRequest request;
    +        private  HttpServletRequest request;
    
        public void execute() throws IOException {
             String s = this.request.getParameter("test");
        }
    +
     can not get the type of variable named request,even know the variable,so does a method that is modified by ’this‘
    
    • status: open --> more-info-needed
    • assigned_to: Andreas Dangel
    • Milestone: New Tickets --> PMD-5.4.0
     
  • Andreas Dangel

    Andreas Dangel - 2015-05-18

    Hi, could you give me a bit more context about this bug?

    • You seem to describe a false positive. For which rule did you find this problem?
    • Can you retest, whether this problem still exists with the latest PMD version?

    Thanks!

     
  • Andreas Dangel

    Andreas Dangel - 2015-10-04
    • Milestone: PMD-5.4.0 --> PMD-5.4.1
    • Ruleset / Rule: -->
     
  • Andreas Dangel

    Andreas Dangel - 2015-12-04
    • Milestone: PMD-5.4.1 --> PMD-5.5.0
     
  • Andreas Dangel

    Andreas Dangel - 2016-06-25
    • Milestone: PMD-5.5.0 --> New Tickets
     

Log in to post a comment.