Harmony
  1. Harmony
  2. HARMONY-6571

[classlib][jndi]Bad URL syntax when we ask a reverse DNS

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      Try this testcase:

      DirContext ictx = new InitialDirContext();
      Attributes attribute;
      try {
      attribute = ictx.getAttributes("dns:///1.0.0.127.in-addr.arpa", new String[]

      { "PTR" }

      );
      } finally

      {ictx.close();}

      System.out.println(attribute.get("PTR").get().toString());

        Activity

        Hide
        Li Jing Qin added a comment -

        The statck trace lists below:

        javax.naming.ConfigurationException: Unable to parse DNS URL
        dns:///1.0.0.127.in-addr.arpa. Bad URL syntax
        at
        org.apache.harmony.jndi.provider.dns.DNSContext.parseProviderUrlProp(DNSContext.java:295)
        at
        org.apache.harmony.jndi.provider.dns.DNSContext.addToEnvironment(DNSContext.java:1820)
        at
        org.apache.harmony.jndi.provider.dns.dnsURLContext.process(dnsURLContext.java:168)
        at
        org.apache.harmony.jndi.provider.dns.dnsURLContext.getAttributes(dnsURLContext.java:69)
        at
        javax.naming.directory.InitialDirContext.getAttributes(InitialDirContext.java:151)
        at DirContextTest.main(DirContextTest.java:15)

        For the api spec, DNS Pseudo-URL was expected when Context.PROVIDER_URL
        was the key. It seems the behavior of parseProviderUrlProp is right.

        Shall we need another provider for the reverse DNS query?


        Yours sincerely,
        Charles Lee

        Show
        Li Jing Qin added a comment - The statck trace lists below: javax.naming.ConfigurationException: Unable to parse DNS URL dns:///1.0.0.127.in-addr.arpa. Bad URL syntax at org.apache.harmony.jndi.provider.dns.DNSContext.parseProviderUrlProp(DNSContext.java:295) at org.apache.harmony.jndi.provider.dns.DNSContext.addToEnvironment(DNSContext.java:1820) at org.apache.harmony.jndi.provider.dns.dnsURLContext.process(dnsURLContext.java:168) at org.apache.harmony.jndi.provider.dns.dnsURLContext.getAttributes(dnsURLContext.java:69) at javax.naming.directory.InitialDirContext.getAttributes(InitialDirContext.java:151) at DirContextTest.main(DirContextTest.java:15) For the api spec, DNS Pseudo-URL was expected when Context.PROVIDER_URL was the key. It seems the behavior of parseProviderUrlProp is right. Shall we need another provider for the reverse DNS query? – Yours sincerely, Charles Lee

          People

          • Assignee:
            Unassigned
            Reporter:
            Li Jing Qin
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:

              Development