René's URL Explorer Experiment


Title: LOC: keep the sign of a negative altitude below zero by simpleqt · Pull Request #433 · dnsjava/dnsjava · GitHub

Open Graph Title: LOC: keep the sign of a negative altitude below zero by simpleqt · Pull Request #433 · dnsjava/dnsjava

X Title: LOC: keep the sign of a negative altitude below zero by simpleqt · Pull Request #433 · dnsjava/dnsjava

Description: Summary A LOC record whose altitude is negative but below one metre loses its sign: the value is parsed and printed as a positive altitude. LOC is defined by RFC 1876, which stores the altitude as an unsigned 32 bit value biased by 100000m in centimeters. Reproduction Record r = Record.fromString(Name.fromString("a.example."), Type.LOC, DClass.IN, 0, "42 21 54 N 71 06 18 W -0.5m 30m 10m 10m", Name.root); ((LOCRecord) r).getAltitude(); // 0.5 -- expected -0.5 r.rdataToString(); // "... W 0.50m ..." -- expected "... W -0.50m ..." The same happens for -0.01m, -0.99m, ... Any input whose magnitude is below 100 centimeters, and equally any input whose magnitude is below one centimeter (e.g. -0.009m becomes a positive 0m). Root cause Two sign losses, both only for values below one divisor: LOCRecord.parseFixedPoint (LOCRecord.java:95-103) split the string on . and negated the fraction only when the integral part was negative. For -0.5, Integer.parseInt("-0") is 0, so the fraction was added instead of subtracted and the result was +0.5. LOCRecord.renderFixedPoint (LOCRecord.java:194-202) printed the sign as part of value / divisor, but -1 / 100 is 0. Math.abs() then erased the sign of the remainder as well, so the wire representation was already correct while the text representation was not. positionToString does not go through either problem for latitude/longitude because it takes the absolute value before rendering and prints N/S or E/W separately. Fix parseFixedPoint detects the leading - up front and negates the assembled value, so the fraction no longer needs to know about the sign of the integral part. renderFixedPoint emits the sign before Math.abs()-ing the value and drops the now redundant Math.abs() on the remainder. Positive values, whole values, and zero render exactly as before. Test LOCRecordTest.rdataFromStringKeepsTheSignOfANegativeAltitude covers -0.01m, -0.5m, -0.99m and -0.999m through Record.fromString, checks the parsed altitude, the printed rdata, and the altitude read back from the record's own wire form. rdataFromStringZeroAltitudeHasNoSign guards against a stray - for a zero altitude. LOCRecordTest 20 tests, 0 failures (4 of them fail on master) full suite 2212 tests, 1 failure (ResolverTest#resolverListenerExceptionUnwrap, fails on master too) mvn spotless:check and mvn checkstyle:check are clean.

Open Graph Description: Summary A LOC record whose altitude is negative but below one metre loses its sign: the value is parsed and printed as a positive altitude. LOC is defined by RFC 1876, which stores the altitude as ...

X Description: Summary A LOC record whose altitude is negative but below one metre loses its sign: the value is parsed and printed as a positive altitude. LOC is defined by RFC 1876, which stores the altitude as ...

Opengraph URL: https://github.com/dnsjava/dnsjava/pull/433

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.114.4

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:613f8b6c-4db5-0f41-150a-b5390fab9624
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id8B8E:161654:13F9219:1A9053B:6B066864
html-safe-nonceee97159743bb671f83533e22c0a69f4bdb7bd4c28aacddab94af8d2e602000f1
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4QjhFOjE2MTY1NDoxM0Y5MjE5OjFBOTA1M0I6NkIwNjY4NjQiLCJ2aXNpdG9yX2lkIjoiMTY4MTcxNDIwMzM5Mzk0MzY1MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac539d50efe28a622b69b1a54ccde8abe70e5940216d30531f7f863ad5f180da6b
hovercard-subject-tagpull_request:5159050772
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/dnsjava/dnsjava/pull/433/files
twitter:imagehttps://avatars.githubusercontent.com/u/89645338?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/89645338?s=400&v=4
og:image:altSummary A LOC record whose altitude is negative but below one metre loses its sign: the value is parsed and printed as a positive altitude. LOC is defined by RFC 1876, which stores the altitude as ...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None6324e6ac990fb6befbec840cc0e102a1071c339bfe8f9826bb12de2e3ba1d297
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/dnsjava/dnsjava git https://github.com/dnsjava/dnsjava.git
octolytics-dimension-user_id6755615
octolytics-dimension-user_logindnsjava
octolytics-dimension-repository_id17084567
octolytics-dimension-repository_nwodnsjava/dnsjava
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id17084567
octolytics-dimension-repository_network_root_nwodnsjava/dnsjava
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release7f0aa75f4141d440c6110dc31af7ea7797abb6c4
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/dnsjava/dnsjava/pull/433/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fdnsjava%2Fdnsjava%2Fpull%2F433%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fdnsjava%2Fdnsjava%2Fpull%2F433%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=dnsjava%2Fdnsjava
Reloadhttps://github.com/dnsjava/dnsjava/pull/433/files
Reloadhttps://github.com/dnsjava/dnsjava/pull/433/files
Reloadhttps://github.com/dnsjava/dnsjava/pull/433/files
dnsjavahttps://github.com/dnsjava
dnsjavahttps://github.com/dnsjava/dnsjava
Codehttps://github.com/dnsjava/dnsjava
Issues16 (16)https://github.com/dnsjava/dnsjava/issues
Pull requests3 (3)https://github.com/dnsjava/dnsjava/pulls
Actionshttps://github.com/dnsjava/dnsjava/actions
Security and quality8 (8)https://github.com/dnsjava/dnsjava/security
Insightshttps://github.com/dnsjava/dnsjava/insights
Sign up for GitHub https://github.com/signup?return_to=%2Fdnsjava%2Fdnsjava%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fdnsjava%2Fdnsjava%2Fissues%2Fnew%2Fchoose
simpleqthttps://github.com/simpleqt
dnsjava:masterhttps://github.com/dnsjava/dnsjava/tree/master
simpleqt:fix/loc-negative-altitude-signhttps://github.com/simpleqt/dnsjava/tree/fix/loc-negative-altitude-sign
Conversation 4 https://github.com/dnsjava/dnsjava/pull/433
Commits 1 https://github.com/dnsjava/dnsjava/pull/433/commits
Checks 20 https://github.com/dnsjava/dnsjava/pull/433/checks
Files changed https://github.com/dnsjava/dnsjava/pull/433/files
Please reload this pagehttps://github.com/dnsjava/dnsjava/pull/433/files
LOC: keep the sign of a negative altitude below zero https://github.com/dnsjava/dnsjava/pull/433/files#top
Show all changes 1 commit https://github.com/dnsjava/dnsjava/pull/433/files
d432a01 LOC: keep the sign of a negative altitude below zero simpleqt Nov 4, 2026 https://github.com/dnsjava/dnsjava/pull/433/commits/d432a01751021eae91fb93c28f53973dbfabc09b
Clear filters https://github.com/dnsjava/dnsjava/pull/433/files
Please reload this pagehttps://github.com/dnsjava/dnsjava/pull/433/files
Please reload this pagehttps://github.com/dnsjava/dnsjava/pull/433/files
LOCRecord.java https://github.com/dnsjava/dnsjava/pull/433/files#diff-6fd2489797bb73f7890e4f03765af501a2d3c31cae3c3179b2abdbebc3317555
LOCRecordTest.java https://github.com/dnsjava/dnsjava/pull/433/files#diff-0122ac6f107bce4ba4389ad808e4dfc4de5866bc86209956318636482226c7f6
src/main/java/org/xbill/DNS/LOCRecord.javahttps://github.com/dnsjava/dnsjava/pull/433/files#diff-6fd2489797bb73f7890e4f03765af501a2d3c31cae3c3179b2abdbebc3317555
View file https://github.com/simpleqt/dnsjava/blob/d432a01751021eae91fb93c28f53973dbfabc09b/src/main/java/org/xbill/DNS/LOCRecord.java
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/dnsjava/dnsjava/pull/433/{{ revealButtonHref }}
https://github.com/dnsjava/dnsjava/pull/433/files#diff-6fd2489797bb73f7890e4f03765af501a2d3c31cae3c3179b2abdbebc3317555
https://github.com/dnsjava/dnsjava/pull/433/files#diff-6fd2489797bb73f7890e4f03765af501a2d3c31cae3c3179b2abdbebc3317555
https://github.com/dnsjava/dnsjava/pull/433/files#diff-6fd2489797bb73f7890e4f03765af501a2d3c31cae3c3179b2abdbebc3317555
https://github.com/dnsjava/dnsjava/pull/433/files#diff-6fd2489797bb73f7890e4f03765af501a2d3c31cae3c3179b2abdbebc3317555
src/test/java/org/xbill/DNS/LOCRecordTest.javahttps://github.com/dnsjava/dnsjava/pull/433/files#diff-0122ac6f107bce4ba4389ad808e4dfc4de5866bc86209956318636482226c7f6
View file https://github.com/simpleqt/dnsjava/blob/d432a01751021eae91fb93c28f53973dbfabc09b/src/test/java/org/xbill/DNS/LOCRecordTest.java
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/dnsjava/dnsjava/pull/433/{{ revealButtonHref }}
https://github.com/dnsjava/dnsjava/pull/433/files#diff-0122ac6f107bce4ba4389ad808e4dfc4de5866bc86209956318636482226c7f6
https://github.com/dnsjava/dnsjava/pull/433/files#diff-0122ac6f107bce4ba4389ad808e4dfc4de5866bc86209956318636482226c7f6
https://github.com/dnsjava/dnsjava/pull/433/files#diff-0122ac6f107bce4ba4389ad808e4dfc4de5866bc86209956318636482226c7f6
Please reload this pagehttps://github.com/dnsjava/dnsjava/pull/433/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlno-cache

Viewport: width=device-width


URLs of crawlers that visited me.