GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — getAddress() in ARecord/AAAARecord should return Inet4Address/Inet6Address · Issue #101 · dnsjava/dnsjava

getAddress() in ARecord/AAAARecord should return Inet4Address/Inet6Address #101

New issue
Copy link
New issue
Copy link
Open
Feature
Open
getAddress() in ARecord/AAAARecord should return Inet4Address/Inet6Address#101
Feature
Copy link
Milestone
v4

Description

@maffe
maffe
opened on Apr 28, 2020
Issue body actions

To avoid having to cast in client code,

  • ARecord.getAddress() should return Inet4Address
  • AAAARecord.getAddress() should return Inet6Address (not feasible since Java creates Inet4Address instances for ::ffff:0.0.0.0/96)

I tried to change the return type (adding casts inside the method), but then I got

Failed to execute goal com.github.siom79.japicmp:japicmp-maven-plugin:0.14.0:cmp (check-compatibility) on project dnsjava: Versions of archives indicate a minor change but binary incompatible changes found.

While this changes the public API, usages of those methods should work like before, as the new return types can still be assigned to InetAddress. What could fail with this change is overriding those methods. Maybe the methods or the classes should be final.

Activity

  1. ibauersachs commented on May 2, 2020

    @ibauersachs
    ibauersachs
    on May 2, 2020
    Member
    More actions

    Unfortunately apicmp is right. While the change is source compatible, it isn't binary compatible and would result in java.lang.NoSuchMethodError: org.xbill.DNS.ARecord.getAddress()Ljava/net/InetAddress.

    I'll stick to semver for this project, so I will consider this for the next major version.

    Reacted by Ruurtjan and Thilo Schwarz
  2. ibauersachs
    added this to the v4 milestone on May 2, 2020
  3. ibauersachs
    added
    enhancement
    on May 26, 2020
  4. maffe commented on Sep 12, 2024

    @maffe
    maffe
    on Sep 12, 2024
    Author
    More actions

    Since Java creates Inet4Address instances for IPv4 mapped addresses (::ffff:0:0/96, Java 22 example: Inet6Address.ofLiteral("::ffff:192.0.2.1")), it’s not possible to map all AAAA records to Inet6Address. But Inet4Address would always be possible for A records.

  5. ibauersachs
    removed
    enhancement
    on Jan 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Feature

    Projects

    No projects

      Milestone

      • v4No due date

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.