[
https://issues.apache.org/jira/browse/CAMEL-25977?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18131142#comment-18131142
]
Claus Ibsen commented on CAMEL-25977:
-------------------------------------
Fixed in PR https://github.com/apache/camel/pull/28373
_Claude Code on behalf of davsclaus_
> camel-dns - dig without the CamelDnsType header fails with a
> NullPointerException, and the wikipedia service is gone
> --------------------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-25977
> URL: https://issues.apache.org/jira/browse/CAMEL-25977
> Project: Camel
> Issue Type: Bug
> Components: camel-dns
> Affects Versions: 4.18.0, 4.22.0, 4.23.0
> Reporter: Claus Ibsen
> Assignee: Claus Ibsen
> Priority: Minor
> Fix For: 4.24.0
>
>
> {{dns:dig}} fails with a NullPointerException when the {{CamelDnsType}}
> header is not set: {{Type.value(null)}} ({{DnsDigProducer}}, main
> e6885df7894d, line 45) calls {{toUpperCase()}} on null. The header is
> documented as optional ({{DnsConstants}}, line 41), and the comment of the
> producer says the type defaults to A, as the DNS class defaults to IN when it
> is not set (lines 56-59). Without the {{CamelDnsName}} header dig fails with
> a NullPointerException as well.
> Also, the service behind {{dns:wikipedia}} is gone: the TXT record it reads
> now says "This was once Wikipedia over DNS ... it is no longer available",
> and its test has been disabled for that reason ({{DnsDigEndpointTest}}, line
> 38).
> Checked on 4.24.0-SNAPSHOT with {{camel run}}:
> * dig with {{CamelDnsType=A}} gives the Message of the answer;
> * dig without it fails with {{NullPointerException: Cannot invoke
> "String.toUpperCase()" because "str" is null}};
> * wikipedia gives the text above.
> *Proposed change*: default the type to A and fail with a clear error when the
> name is missing; deprecate the wikipedia type.
> _Claude Code on behalf of davsclaus_
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)