Hi Guenther,

Before we can accept patches or changes from an external contributor you must sign the Contributor Agreement [1]. I looked at the list of contributors and cannot find you listed.

I haven't looked at the patch yet, but I have looked at the testcase that's in CR 6991580. Have you tried to set java.naming.provider.url in your environment? You will need to have square brackets around the host name if it is an IPv6 literal address. Whatever change is applied to resolve this issue will have to be compatible with existing DNS Pseudo-URLs supplied to java.naming.provider.url.

Thanks
-Chris.

[1] https://sca.dev.java.net/



On 15/10/2010 14:38, Guenther Niess wrote:
The related Bug has the number 6991580. I wrote a small patch:

diff -ur openjdk.orig/jdk/src/share/classes/com/sun/jndi/dns/DnsClient.java 
openjdk/jdk/src/share/classes/com/sun/jndi/dns/DnsClient.java
--- openjdk.orig/jdk/src/share/classes/com/sun/jndi/dns/DnsClient.java  
2010-08-23 13:55:13.000000000 +0200
+++ openjdk/jdk/src/share/classes/com/sun/jndi/dns/DnsClient.java       
2010-08-23 21:42:51.000000000 +0200
@@ -118,6 +118,7 @@
              // Is optional port given?
              int colon = servers[i].indexOf(':',
                                             servers[i].indexOf(']') + 1);
+            colon = servers[i].lastIndexOf(':') == colon ? colon : -1;

              serverPorts[i] = (colon<  0)
                  ? DEFAULT_PORT

But I'm not sure if this is the right location to fix it.

-Guenther

Reply via email to