QDox
  1. QDox
  2. QDOX-27

Javadoc comment ending with "**/" is parsed incorrectly

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 1.3
    • Fix Version/s: 1.4
    • Component/s: Parser
    • Labels:
      None
    • Number of attachments :
      0

      Description

      As reported by Mike Hogan <me@mikehogan.net>, the following test-case fails:

      public void testClassLoad() {
      final String sourceCode =
      "package com.acme.thing;\n" +
      "\n" +
      "/**" +
      " * This class does something." +
      " **/" +
      "public class AClassName

      {\n" + "}

      ";
      JavaDocBuilder builder = new JavaDocBuilder();
      builder.addSource(new StringReader(sourceCode));
      final JavaClass aClass =
      builder.getClassByName("com.acme.thing.AClassName");
      assertNotNull(aClass);
      }

      If you delete the javadoc block, the test passes.

        Activity

        Mike Williams made changes -
        Field Original Value New Value
        Affects Version/s 1.4 [ 10304 ]
        Description As reported by Mike Hogan <me@mikehogan.net>, the following test-case fails:

            public void testClassLoad() {
                final String sourceCode =
                        "package com.acme.thing;\n" +
                        "\n" +
                        "/**" +
                        " * This class does something." +
                        " **/" +
                        "public class AClassName {\n" +
                        "}";
                JavaDocBuilder builder = new JavaDocBuilder();
                builder.addSource(new StringReader(sourceCode));
                final JavaClass aClass =
                    builder.getClassByName("com.acme.thing.AClassName");
                assertNotNull(aClass);
            }

        If you delete the javadoc block, the test passes.
        As reported by Mike Hogan <me@mikehogan.net>, the following test-case fails:

            public void testClassLoad() {
                final String sourceCode =
                        "package com.acme.thing;\n" +
                        "\n" +
                        "/**" +
                        " * This class does something." +
                        " **/" +
                        "public class AClassName {\n" +
                        "}";
                JavaDocBuilder builder = new JavaDocBuilder();
                builder.addSource(new StringReader(sourceCode));
                final JavaClass aClass =
                    builder.getClassByName("com.acme.thing.AClassName");
                assertNotNull(aClass);
            }

        If you delete the javadoc block, the test passes.
        Mike Williams made changes -
        Resolution Fixed [ 1 ]
        Status Assigned [ 2 ] Resolved [ 5 ]
        Mike Williams made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Mike Williams
            Reporter:
            Mike Williams
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 2 hours
              2h
              Remaining:
              Remaining Estimate - 2 hours
              2h
              Logged:
              Time Spent - Not Specified
              Not Specified