Title: NullPointerException in HostsFileParser.getAddressForHost - hostsCache not initialized · Issue #400 · dnsjava/dnsjava · GitHub
Open Graph Title: NullPointerException in HostsFileParser.getAddressForHost - hostsCache not initialized · Issue #400 · dnsjava/dnsjava
X Title: NullPointerException in HostsFileParser.getAddressForHost - hostsCache not initialized · Issue #400 · dnsjava/dnsjava
Description: We've started seeing this exception in our product in the wild after updating from 3.6.2 to 3.6.4 . It looks like validateCache doesn't always initialize the hostsCache. Could have been this commit 5609998 ? java.lang.NullPointerExceptio...
Open Graph Description: We've started seeing this exception in our product in the wild after updating from 3.6.2 to 3.6.4 . It looks like validateCache doesn't always initialize the hostsCache. Could have been this commit...
X Description: We've started seeing this exception in our product in the wild after updating from 3.6.2 to 3.6.4 . It looks like validateCache doesn't always initialize the hostsCache. Could have been thi...
Opengraph URL: https://github.com/dnsjava/dnsjava/issues/400
X: @github
Domain: github.com
IPv4 address: 140.82.112.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"NullPointerException in HostsFileParser.getAddressForHost - hostsCache not initialized","articleBody":"We've started seeing this exception in our product in the wild after updating from 3.6.2 to 3.6.4 . It looks like `validateCache` doesn't always initialize the `hostsCache`.\nCould have been this commit https://github.com/dnsjava/dnsjava/commit/560999841b5041c76c57605b367aefd75a150620 ?\n\n```\njava.lang.NullPointerException: Attempt to invoke interface method 'java.lang.Object java.util.Map.get(java.lang.Object)' on a null object reference\n at org.xbill.DNS.hosts.HostsFileParser.getAddressForHost(HostsFileParser.java:111)\n at org.xbill.DNS.Lookup.lookupFromHostsFile(Lookup.java:649)\n at org.xbill.DNS.Lookup.lookup(Lookup.java:586)\n at org.xbill.DNS.Lookup.resolve(Lookup.java:675)\n at org.xbill.DNS.Lookup.run(Lookup.java:697)\n at ...\n```","author":{"url":"https://github.com/msimonides-proton","@type":"Person","name":"msimonides-proton"},"datePublished":"2026-02-25T08:30:03Z","url":"https://github.com/dnsjava/dnsjava/issues/400"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:f7ec1005-63e9-4b7e-30bb-a0796c6e9d84 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C2E0:1FD7D4:6D2F69:922CC6:6B062CA8 |
| html-safe-nonce | 6429ec21fcec81e865ff7056b5c2c22abb35dc2eaa91785925e493ba2a873809 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMkUwOjFGRDdENDo2RDJGNjk6OTIyQ0M2OjZCMDYyQ0E4IiwidmlzaXRvcl9pZCI6IjM5MzE5NTY5NjI1ODUzNTc0ODEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | c617bf2a3ecd12a9b3a0d5beea621cec1d81603946c20ac206511b4352046595 |
| hovercard-subject-tag | issue:3987968699 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/dnsjava/dnsjava/400/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7549a1b05782d761c9586c245156287fcfe3fc648aabfa83870e9d12782edc82/dnsjava/dnsjava/issues/400 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7549a1b05782d761c9586c245156287fcfe3fc648aabfa83870e9d12782edc82/dnsjava/dnsjava/issues/400 |
| og:image:alt | We've started seeing this exception in our product in the wild after updating from 3.6.2 to 3.6.4 . It looks like validateCache doesn't always initialize the hostsCache. Could have been this commit... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | msimonides-proton |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7f961de5dd5c5d4aca24d33f8b3ffb3fb8b2ef53d0a4f32f01f0a790e512f6d3 |
| turbo-cache-control | no-preview |
| go-import | github.com/dnsjava/dnsjava git https://github.com/dnsjava/dnsjava.git |
| octolytics-dimension-user_id | 6755615 |
| octolytics-dimension-user_login | dnsjava |
| octolytics-dimension-repository_id | 17084567 |
| octolytics-dimension-repository_nwo | dnsjava/dnsjava |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 17084567 |
| octolytics-dimension-repository_network_root_nwo | dnsjava/dnsjava |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 494ea0bb1e0feef734a83e2628697647755e8864 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width