QDox

Static block source code gets associated with source code of subsequent method

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.6.1, 1.6.2, 1.6.3, 1.7
  • Fix Version/s: 1.8
  • Component/s: Parser
  • Labels:
    None
  • Testcase included:
    yes
  • Number of attachments :
    2

Description

Static block source code gets associated with source code of subsequent method.

For example, with the following class:

public class Sample {
static { /* static body */ }
public Sample() { /* body */ }
}

Calling m.getSourceCode() on the constructor gives:

/* static body / / body */

The attached patch contains a (failing) test case that reproduces this.

  1. Qdox-145.patch
    06/Jan/09 11:12 AM
    0.4 kB
    Robert Scholte
  2. qdox-static-test-case.patch
    06/Nov/08 2:09 PM
    1 kB
    Elliot Schwartz

Activity

Hide
Robert Scholte added a comment -

bug found and fixed.See patch. The path with the test should succeed the next time

Show
Robert Scholte added a comment - bug found and fixed.See patch. The path with the test should succeed the next time
Hide
Robert Scholte added a comment -

patch applied

Show
Robert Scholte added a comment - patch applied

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: