QDox
  1. QDox
  2. QDOX-145

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
        0.4 kB
        Robert Scholte
      2. qdox-static-test-case.patch
        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
        Robert Scholte made changes -
        Field Original Value New Value
        Attachment Qdox-145.patch [ 39196 ]
        Hide
        Robert Scholte added a comment -

        patch applied

        Show
        Robert Scholte added a comment - patch applied
        Robert Scholte made changes -
        Resolution Fixed [ 1 ]
        Status Open [ 1 ] Closed [ 6 ]
        Fix Version/s 1.8 [ 14826 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Elliot Schwartz
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: