Uploaded image for project: 'Beam'
  1. Beam
  2. BEAM-6679

Fix javadoc @ litterals

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.11.0
    • Component/s: sdk-java-core
    • Labels:
      None

      Description

      The combination of `<pre>` for preserving line breaks and `

      {@code` for preserving angle brackets and curly brackets _mostly_ works. `@` is the problematic character. I see `\{@literal @}

      ` show up in many classes' Javadoc, and that method doesn't do what's intended. In current Java 8 builds, it looks like `@` inside `{@code}` is not a problem in the general case and doesn't need to be escaped. The one exception is when `@` is the first non-whitespace character in a line, in which case it appears that Javadoc thinks it's a tag like `@return` or `@param` and throws an error.

      The solution here is to end the `@code` block and start a new one on the line that contains '@' litteral. Note that `@code` and `@literal` blocks, while they will render literal curly brackets, expect curly brackets to be balanced. Thus, we have to end the previous code block before the `{` that opens the next block

        Attachments

          Activity

            People

            • Assignee:
              jeff.klukas@gmail.com Jeff Klukas
              Reporter:
              jeff.klukas@gmail.com Jeff Klukas
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 4h 40m
                4h 40m