[ 
https://issues.apache.org/jira/browse/KAFKA-13256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

René Kerner updated KAFKA-13256:
--------------------------------
    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:
{code:java}
 b.append(key.documentation.replaceAll("\n", "<br>"));
{code}
{code:java}
 for (String docLine : key.documentation.split("\n")) {
{code}
 

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.

  was:
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 `documentation` member variable to be a 
java.lang.String instance that's set to an actual value different than NULL, 
else NPE happens:

{code}
 b.append(key.documentation.replaceAll("\n", "<br>"));
{code}

{code}
 for (String docLine : key.documentation.split("\n")) {
{code}

 

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.


> Possible NPE in ConfigDef when rendering (enriched) RST or HTML when 
> documentation is not set/NULL
> --------------------------------------------------------------------------------------------------
>
>                 Key: KAFKA-13256
>                 URL: https://issues.apache.org/jira/browse/KAFKA-13256
>             Project: Kafka
>          Issue Type: Bug
>          Components: clients
>    Affects Versions: 2.8.0
>            Reporter: René Kerner
>            Priority: Major
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> 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:
> {code:java}
>  b.append(key.documentation.replaceAll("\n", "<br>"));
> {code}
> {code:java}
>  for (String docLine : key.documentation.split("\n")) {
> {code}
>  
> 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.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to