Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-13256

Possible NPE in ConfigDef when rendering (enriched) RST or HTML when documentation is not set/NULL

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.8.0, 3.0.0
    • 3.1.0
    • clients
    • None

    Description

      While working on Debezium I discovered the following issue:

      When Kafka's ConfigDef renders the HTML or RST documentation representation of the config definition, it requires `ConfigKey.documentation` member variable to be a java.lang.String instance that's set to an actual value different than NULL, else NPE happens:

       b.append(key.documentation.replaceAll("\n", "<br>"));
      
       for (String docLine : key.documentation.split("\n")) {
      

       

      When `documentation` is not set/NULL I suggest to either set a valid String like "No documentation available" or skip that config key.

       

      I could provide a PR to fix this soon.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            rk3rn3r René Kerner
            rk3rn3r René Kerner
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

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

                Slack

                  Issue deployment