harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r825471 - /harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/dns/ProviderConstants.java
Date Thu, 15 Oct 2009 12:10:32 GMT
Author: tellison
Date: Thu Oct 15 12:10:31 2009
New Revision: 825471

URL: http://svn.apache.org/viewvc?rev=825471&view=rev
Log:
Mark the DNS root name as final so it cannot be subsequently modified.

Modified:
    harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/dns/ProviderConstants.java

Modified: harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/dns/ProviderConstants.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/dns/ProviderConstants.java?rev=825471&r1=825470&r2=825471&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/dns/ProviderConstants.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/dns/ProviderConstants.java
Thu Oct 15 12:10:31 2009
@@ -116,7 +116,7 @@
     public static final int DEFAULT_LOOKUP_ATTR_CLASS = IN_CLASS;
     public static final int DEFAULT_MAX_THREADS = 7;
     
-    public static DNSName ROOT_ZONE_NAME_OBJ = null;
+    public static final DNSName ROOT_ZONE_NAME_OBJ;
     
     // public static final String LOGGER_NAME =
     //        "org.apache.harmony.jndi.provider.dns";
@@ -162,10 +162,12 @@
         rrClassNames[ANY_QCLASS] = "*"; //$NON-NLS-1$
 
         // Root zone name
+        DNSName root = null;
         try {
-            ROOT_ZONE_NAME_OBJ = (DNSName) ((new DNSNameParser()).parse(".")); //$NON-NLS-1$
+            root = (DNSName) ((new DNSNameParser()).parse(".")); //$NON-NLS-1$
         } catch (InvalidNameException e) {
             // ignore
         }
+        ROOT_ZONE_NAME_OBJ = root;
     }
 }



Mime
View raw message