directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From erodrig...@apache.org
Subject svn commit: r265671 - in /directory/protocol-providers/dns/trunk/src/java/org/apache/dns: messages/ records/ records/internet/
Date Thu, 01 Sep 2005 08:08:34 GMT
Author: erodriguez
Date: Thu Sep  1 01:08:28 2005
New Revision: 265671

URL: http://svn.apache.org/viewcvs?rev=265671&view=rev
Log:
Formatting:  imports, line breaks, whitespace, or other code convention.

Modified:
    directory/protocol-providers/dns/trunk/src/java/org/apache/dns/messages/MessageType.java
    directory/protocol-providers/dns/trunk/src/java/org/apache/dns/messages/OpCode.java
    directory/protocol-providers/dns/trunk/src/java/org/apache/dns/messages/ResponseCode.java
    directory/protocol-providers/dns/trunk/src/java/org/apache/dns/records/RecordClass.java
    directory/protocol-providers/dns/trunk/src/java/org/apache/dns/records/RecordType.java
    directory/protocol-providers/dns/trunk/src/java/org/apache/dns/records/internet/ProtocolType.java
    directory/protocol-providers/dns/trunk/src/java/org/apache/dns/records/internet/ServiceType.java

Modified: directory/protocol-providers/dns/trunk/src/java/org/apache/dns/messages/MessageType.java
URL: http://svn.apache.org/viewcvs/directory/protocol-providers/dns/trunk/src/java/org/apache/dns/messages/MessageType.java?rev=265671&r1=265670&r2=265671&view=diff
==============================================================================
--- directory/protocol-providers/dns/trunk/src/java/org/apache/dns/messages/MessageType.java
(original)
+++ directory/protocol-providers/dns/trunk/src/java/org/apache/dns/messages/MessageType.java
Thu Sep  1 01:08:28 2005
@@ -30,6 +30,25 @@
     public static final MessageType QUERY = new MessageType( 0, "Query" );
     public static final MessageType RESPONSE = new MessageType( 1, "Response" );
 
+    /**
+     * These two lines are all that's necessary to export a List of VALUES.
+     */
+    private static final MessageType[] values = { QUERY, RESPONSE };
+    // VALUES needs to be located here, otherwise illegal forward reference
+    public static final List VALUES = Collections.unmodifiableList( Arrays.asList( values
) );
+
+    private final String name;
+    private final int ordinal;
+
+    /**
+     * Private constructor prevents construction outside of this class.
+     */
+    private MessageType( int ordinal, String name )
+    {
+        this.ordinal = ordinal;
+        this.name = name;
+    }
+
     public String toString()
     {
         return name;
@@ -43,7 +62,13 @@
     public static MessageType getTypeByOrdinal( int type )
     {
         for ( int ii = 0; ii < values.length; ii++ )
-            if ( values[ ii ].ordinal == type ) return values[ ii ];
+        {
+            if ( values[ ii ].ordinal == type )
+            {
+                return values[ ii ];
+            }
+        }
+
         return QUERY;
     }
 
@@ -51,24 +76,4 @@
     {
         return ordinal;
     }
-
-    /// PRIVATE /////
-    private final String name;
-    private final int ordinal;
-
-    /**
-     * Private constructor prevents construction outside of this class.
-     */
-    private MessageType( int ordinal, String name )
-    {
-        this.ordinal = ordinal;
-        this.name = name;
-    }
-
-    /**
-     * These two lines are all that's necessary to export a List of VALUES.
-     */
-    private static final MessageType[] values = { QUERY, RESPONSE };
-    // VALUES needs to be located here, otherwise illegal forward reference
-    public static final List VALUES = Collections.unmodifiableList( Arrays.asList( values
) );
 }

Modified: directory/protocol-providers/dns/trunk/src/java/org/apache/dns/messages/OpCode.java
URL: http://svn.apache.org/viewcvs/directory/protocol-providers/dns/trunk/src/java/org/apache/dns/messages/OpCode.java?rev=265671&r1=265670&r2=265671&view=diff
==============================================================================
--- directory/protocol-providers/dns/trunk/src/java/org/apache/dns/messages/OpCode.java (original)
+++ directory/protocol-providers/dns/trunk/src/java/org/apache/dns/messages/OpCode.java Thu
Sep  1 01:08:28 2005
@@ -33,6 +33,25 @@
     public static final OpCode NOTIFY = new OpCode( 4, "Zone transfer notification" );
     public static final OpCode UPDATE = new OpCode( 5, "Dynamic update message" );
 
+    /**
+     * These two lines are all that's necessary to export a List of VALUES.
+     */
+    private static final OpCode[] values = { QUERY, IQUERY, STATUS, NOTIFY, UPDATE };
+    // VALUES needs to be located here, otherwise illegal forward reference
+    public static final List VALUES = Collections.unmodifiableList( Arrays.asList( values
) );
+
+    private final String name;
+    private final int ordinal;
+
+    /**
+     * Private constructor prevents construction outside of this class.
+     */
+    private OpCode( int ordinal, String name )
+    {
+        this.ordinal = ordinal;
+        this.name = name;
+    }
+
     public String toString()
     {
         return name;
@@ -46,7 +65,13 @@
     public static OpCode getTypeByOrdinal( int type )
     {
         for ( int ii = 0; ii < values.length; ii++ )
-            if ( values[ ii ].ordinal == type ) return values[ ii ];
+        {
+            if ( values[ ii ].ordinal == type )
+            {
+                return values[ ii ];
+            }
+        }
+
         return QUERY;
     }
 
@@ -54,24 +79,4 @@
     {
         return ordinal;
     }
-
-    /// PRIVATE /////
-    private final String name;
-    private final int ordinal;
-
-    /**
-     * Private constructor prevents construction outside of this class.
-     */
-    private OpCode( int ordinal, String name )
-    {
-        this.ordinal = ordinal;
-        this.name = name;
-    }
-
-    /**
-     * These two lines are all that's necessary to export a List of VALUES.
-     */
-    private static final OpCode[] values = { QUERY, IQUERY, STATUS, NOTIFY, UPDATE };
-    // VALUES needs to be located here, otherwise illegal forward reference
-    public static final List VALUES = Collections.unmodifiableList( Arrays.asList( values
) );
 }

Modified: directory/protocol-providers/dns/trunk/src/java/org/apache/dns/messages/ResponseCode.java
URL: http://svn.apache.org/viewcvs/directory/protocol-providers/dns/trunk/src/java/org/apache/dns/messages/ResponseCode.java?rev=265671&r1=265670&r2=265671&view=diff
==============================================================================
--- directory/protocol-providers/dns/trunk/src/java/org/apache/dns/messages/ResponseCode.java
(original)
+++ directory/protocol-providers/dns/trunk/src/java/org/apache/dns/messages/ResponseCode.java
Thu Sep  1 01:08:28 2005
@@ -39,6 +39,26 @@
     public static final ResponseCode REFUSED = new ResponseCode( 5,
             "The name server refuses to perform the specified operation for policy reasons."
);
 
+    /**
+     * These two lines are all that's necessary to export a List of VALUES.
+     */
+    private static final ResponseCode[] values = { NO_ERROR, FORMAT_ERROR, SERVER_FAILURE,
NAME_ERROR, NOT_IMPLEMENTED,
+            REFUSED };
+    // VALUES needs to be located here, otherwise illegal forward reference
+    public static final List VALUES = Collections.unmodifiableList( Arrays.asList( values
) );
+
+    private final String name;
+    private final int ordinal;
+
+    /**
+     * Private constructor prevents construction outside of this class.
+     */
+    private ResponseCode( int ordinal, String name )
+    {
+        this.ordinal = ordinal;
+        this.name = name;
+    }
+
     public String toString()
     {
         return name;
@@ -52,7 +72,13 @@
     public static ResponseCode getTypeByOrdinal( int type )
     {
         for ( int ii = 0; ii < values.length; ii++ )
-            if ( values[ ii ].ordinal == type ) return values[ ii ];
+        {
+            if ( values[ ii ].ordinal == type )
+            {
+                return values[ ii ];
+            }
+        }
+
         return NO_ERROR;
     }
 
@@ -60,25 +86,4 @@
     {
         return ordinal;
     }
-
-    /// PRIVATE /////
-    private final String name;
-    private final int ordinal;
-
-    /**
-     * Private constructor prevents construction outside of this class.
-     */
-    private ResponseCode( int ordinal, String name )
-    {
-        this.ordinal = ordinal;
-        this.name = name;
-    }
-
-    /**
-     * These two lines are all that's necessary to export a List of VALUES.
-     */
-    private static final ResponseCode[] values = { NO_ERROR, FORMAT_ERROR, SERVER_FAILURE,
NAME_ERROR, NOT_IMPLEMENTED,
-            REFUSED };
-    // VALUES needs to be located here, otherwise illegal forward reference
-    public static final List VALUES = Collections.unmodifiableList( Arrays.asList( values
) );
 }

Modified: directory/protocol-providers/dns/trunk/src/java/org/apache/dns/records/RecordClass.java
URL: http://svn.apache.org/viewcvs/directory/protocol-providers/dns/trunk/src/java/org/apache/dns/records/RecordClass.java?rev=265671&r1=265670&r2=265671&view=diff
==============================================================================
--- directory/protocol-providers/dns/trunk/src/java/org/apache/dns/records/RecordClass.java
(original)
+++ directory/protocol-providers/dns/trunk/src/java/org/apache/dns/records/RecordClass.java
Thu Sep  1 01:08:28 2005
@@ -34,6 +34,25 @@
     public static final RecordClass NONE = new RecordClass( 254, "Special value used in dynamic
update messages" );
     public static final RecordClass ANY = new RecordClass( 255, "Any class" );
 
+    /**
+     * These two lines are all that's necessary to export a List of VALUES.
+     */
+    private static final RecordClass[] values = { IN, CS, CH, HS, NONE, ANY };
+    // VALUES needs to be located here, otherwise illegal forward reference
+    public static final List VALUES = Collections.unmodifiableList( Arrays.asList( values
) );
+
+    private final String name;
+    private final int ordinal;
+
+    /**
+     * Private constructor prevents construction outside of this class.
+     */
+    private RecordClass( int ordinal, String name )
+    {
+        this.ordinal = ordinal;
+        this.name = name;
+    }
+
     public String toString()
     {
         return name;
@@ -46,8 +65,14 @@
 
     public static RecordClass getTypeByOrdinal( int type )
     {
-        for ( int i = 0; i < values.length; i++ )
-            if ( values[ i ].ordinal == type ) return values[ i ];
+        for ( int ii = 0; ii < values.length; ii++ )
+        {
+            if ( values[ ii ].ordinal == type )
+            {
+                return values[ ii ];
+            }
+        }
+
         return IN;
     }
 
@@ -55,24 +80,4 @@
     {
         return ordinal;
     }
-
-    /// PRIVATE /////
-    private final String name;
-    private final int ordinal;
-
-    /**
-     * Private constructor prevents construction outside of this class.
-     */
-    private RecordClass( int ordinal, String name )
-    {
-        this.ordinal = ordinal;
-        this.name = name;
-    }
-
-    /**
-     * These two lines are all that's necessary to export a List of VALUES.
-     */
-    private static final RecordClass[] values = { IN, CS, CH, HS, NONE, ANY };
-    // VALUES needs to be located here, otherwise illegal forward reference
-    public static final List VALUES = Collections.unmodifiableList( Arrays.asList( values
) );
 }

Modified: directory/protocol-providers/dns/trunk/src/java/org/apache/dns/records/RecordType.java
URL: http://svn.apache.org/viewcvs/directory/protocol-providers/dns/trunk/src/java/org/apache/dns/records/RecordType.java?rev=265671&r1=265670&r2=265671&view=diff
==============================================================================
--- directory/protocol-providers/dns/trunk/src/java/org/apache/dns/records/RecordType.java
(original)
+++ directory/protocol-providers/dns/trunk/src/java/org/apache/dns/records/RecordType.java
Thu Sep  1 01:08:28 2005
@@ -82,6 +82,30 @@
     public static final RecordType MAILA = new RecordType( 254, "MAILA", "Request for mail
agent resource records" );
     public static final RecordType ANY = new RecordType( 255, "ANY", "Request for all records"
);
 
+    /**
+     * These two lines are all that's necessary to export a List of VALUES.
+     */
+    private static final RecordType[] values = { A, NS, MD, MF, CNAME, SOA, MB, MG, MR, NULL,
WKS, PTR, HINFO, MINFO,
+            MX, TXT, RP, AFSDB, X25, ISDN, RT, NSAP, NSAP_PTR, SIG, KEY, PX, GPOS, AAAA,
LOC, NXT, EID, NIMLOC, SRV,
+            ATMA, NAPTR, KX, CERT, A6, DNAME, OPT, APL, DS, SSHFP, RRSIG, NSEC, DNSKEY, TKEY,
TSIG, IXFR, AXFR, MAILB,
+            MAILA, ANY };
+    // VALUES needs to be located here, otherwise illegal forward reference
+    public static final List VALUES = Collections.unmodifiableList( Arrays.asList( values
) );
+
+    private final String name;
+    private final String code;
+    private final int ordinal;
+
+    /**
+     * Private constructor prevents construction outside of this class.
+     */
+    private RecordType( int ordinal, String code, String name )
+    {
+        this.ordinal = ordinal;
+        this.code = code;
+        this.name = name;
+    }
+
     public String toString()
     {
         return name;
@@ -95,14 +119,26 @@
     public static RecordType getTypeByOrdinal( int type )
     {
         for ( int ii = 0; ii < values.length; ii++ )
-            if ( values[ ii ].ordinal == type ) return values[ ii ];
+        {
+            if ( values[ ii ].ordinal == type )
+            {
+                return values[ ii ];
+            }
+        }
+
         return A;
     }
 
     public static RecordType getTypeByName( String type )
     {
         for ( int ii = 0; ii < values.length; ii++ )
-            if ( values[ ii ].code.equalsIgnoreCase( type ) ) return values[ ii ];
+        {
+            if ( values[ ii ].code.equalsIgnoreCase( type ) )
+            {
+                return values[ ii ];
+            }
+        }
+
         return A;
     }
 
@@ -130,29 +166,4 @@
                 return true;
         }
     }
-
-    /// PRIVATE /////
-    private final String name;
-    private final String code;
-    private final int ordinal;
-
-    /**
-     * Private constructor prevents construction outside of this class.
-     */
-    private RecordType( int ordinal, String code, String name )
-    {
-        this.ordinal = ordinal;
-        this.code = code;
-        this.name = name;
-    }
-
-    /**
-     * These two lines are all that's necessary to export a List of VALUES.
-     */
-    private static final RecordType[] values = { A, NS, MD, MF, CNAME, SOA, MB, MG, MR, NULL,
WKS, PTR, HINFO, MINFO,
-            MX, TXT, RP, AFSDB, X25, ISDN, RT, NSAP, NSAP_PTR, SIG, KEY, PX, GPOS, AAAA,
LOC, NXT, EID, NIMLOC, SRV,
-            ATMA, NAPTR, KX, CERT, A6, DNAME, OPT, APL, DS, SSHFP, RRSIG, NSEC, DNSKEY, TKEY,
TSIG, IXFR, AXFR, MAILB,
-            MAILA, ANY };
-    // VALUES needs to be located here, otherwise illegal forward reference
-    public static final List VALUES = Collections.unmodifiableList( Arrays.asList( values
) );
 }

Modified: directory/protocol-providers/dns/trunk/src/java/org/apache/dns/records/internet/ProtocolType.java
URL: http://svn.apache.org/viewcvs/directory/protocol-providers/dns/trunk/src/java/org/apache/dns/records/internet/ProtocolType.java?rev=265671&r1=265670&r2=265671&view=diff
==============================================================================
--- directory/protocol-providers/dns/trunk/src/java/org/apache/dns/records/internet/ProtocolType.java
(original)
+++ directory/protocol-providers/dns/trunk/src/java/org/apache/dns/records/internet/ProtocolType.java
Thu Sep  1 01:08:28 2005
@@ -71,6 +71,28 @@
     public static final ProtocolType WB_MON = new ProtocolType( 78, "WIDEBAND Monitoring"
);
     public static final ProtocolType WB_EXPAK = new ProtocolType( 79, "WIDEBAND EXPAK" );
 
+    /**
+     * These two lines are all that's necessary to export a List of VALUES.
+     */
+    private static final ProtocolType[] values = { NULL, ICMP, IGMP, GGP, ST, TCP, UCL, EGP,
IGP, BBN_RCC_MON, NVP_II,
+            PUP, ARGUS, EMCON, XNET, CHAOS, UDP, MUX, DCN_MEAS, HMP, PRM, XNS_IDP, TRUNK_1,
TRUNK_2, LEAF_1, LEAF_2,
+            RDP, IRTP, ISO_TP4, NETBLT, MFE_NSP, MERIT_INP, SEP, CFTP, SAT_EXPAK, MIT_SUBNET,
RVD, IPPC, SAT_MON, IPCV,
+            BR_SAT_MON, WB_MON, WB_EXPAK };
+    // VALUES needs to be located here, otherwise illegal forward reference
+    public static final List VALUES = Collections.unmodifiableList( Arrays.asList( values
) );
+
+    private final String name;
+    private final int ordinal;
+
+    /**
+     * Private constructor prevents construction outside of this class.
+     */
+    private ProtocolType( int ordinal, String name )
+    {
+        this.ordinal = ordinal;
+        this.name = name;
+    }
+
     public String toString()
     {
         return name;
@@ -84,7 +106,13 @@
     public static ProtocolType getTypeByOrdinal( int type )
     {
         for ( int ii = 0; ii < values.length; ii++ )
-            if ( values[ ii ].ordinal == type ) return values[ ii ];
+        {
+            if ( values[ ii ].ordinal == type )
+            {
+                return values[ ii ];
+            }
+        }
+
         return NULL;
     }
 
@@ -92,27 +120,4 @@
     {
         return ordinal;
     }
-
-    /// PRIVATE /////
-    private final String name;
-    private final int ordinal;
-
-    /**
-     * Private constructor prevents construction outside of this class.
-     */
-    private ProtocolType( int ordinal, String name )
-    {
-        this.ordinal = ordinal;
-        this.name = name;
-    }
-
-    /**
-     * These two lines are all that's necessary to export a List of VALUES.
-     */
-    private static final ProtocolType[] values = { NULL, ICMP, IGMP, GGP, ST, TCP, UCL, EGP,
IGP, BBN_RCC_MON, NVP_II,
-            PUP, ARGUS, EMCON, XNET, CHAOS, UDP, MUX, DCN_MEAS, HMP, PRM, XNS_IDP, TRUNK_1,
TRUNK_2, LEAF_1, LEAF_2,
-            RDP, IRTP, ISO_TP4, NETBLT, MFE_NSP, MERIT_INP, SEP, CFTP, SAT_EXPAK, MIT_SUBNET,
RVD, IPPC, SAT_MON, IPCV,
-            BR_SAT_MON, WB_MON, WB_EXPAK };
-    // VALUES needs to be located here, otherwise illegal forward reference
-    public static final List VALUES = Collections.unmodifiableList( Arrays.asList( values
) );
 }

Modified: directory/protocol-providers/dns/trunk/src/java/org/apache/dns/records/internet/ServiceType.java
URL: http://svn.apache.org/viewcvs/directory/protocol-providers/dns/trunk/src/java/org/apache/dns/records/internet/ServiceType.java?rev=265671&r1=265670&r2=265671&view=diff
==============================================================================
--- directory/protocol-providers/dns/trunk/src/java/org/apache/dns/records/internet/ServiceType.java
(original)
+++ directory/protocol-providers/dns/trunk/src/java/org/apache/dns/records/internet/ServiceType.java
Thu Sep  1 01:08:28 2005
@@ -108,6 +108,32 @@
     public static final ServiceType SUR_MEAS = new ServiceType( 243, "Survey Measurement"
);
     public static final ServiceType LINK = new ServiceType( 245, "LINK" );
 
+    /**
+     * These two lines are all that's necessary to export a List of VALUES.
+     */
+    private static final ServiceType[] values = { NULL, RJE, ECHO, DISCARD, USERS, DAYTIME,
QUOTE, CHARGEN, FTP_DATA,
+            FTP, TELNET, SMTP, NSW_FE, MSG_ICP, MSG_AUTH, DSP, TIME, RLP, GRAPHICS, NAMESERVER,
NICKNAME, MPM_FLAGS,
+            MPM, MPM_SND, NI_FTP, LOGIN, LA_MAINT, DOMAIN, ISI_GL, NI_MAIL, VIA_FTP, TACACS_DS,
BOOTPS, BOOTPC, TFTP,
+            NETRJS_1, NETRJS_2, NETRJS_3, NETRJS_4, FINGER, HOSTS2_NS, SU_MIT_TG, MIT_DOV,
DCP, SUPDUP, SWIFT_RVF,
+            TACNEWS, METAGRAM, HOSTNAME, ISO_TSAP, X400, X400_SND, CSNET_NS, RTELNET, POP_2,
SUNRPC, AUTH, SFTP,
+            UUCP_PATH, NNTP, ERPC, NTP, LOCUS_MAP, LOCUS_CON, PWDGEN, CISCO_FNA, CISCO_TNA,
CISCO_SYS, STATSRV,
+            INGRES_NET, LOC_SRV, PROFILE, NETBIOS_NS, NETBIOS_DGM, NETBIOS_SSN, EMFIS_DATA,
EMFIS_CNTL, BL_IDM,
+            SUR_MEAS, LINK };
+    // VALUES needs to be located here, otherwise illegal forward reference
+    public static final List VALUES = Collections.unmodifiableList( Arrays.asList( values
) );
+
+    private final String name;
+    private final int ordinal;
+
+    /**
+     * Private constructor prevents construction outside of this class.
+     */
+    private ServiceType( int ordinal, String name )
+    {
+        this.ordinal = ordinal;
+        this.name = name;
+    }
+
     public String toString()
     {
         return name;
@@ -121,7 +147,13 @@
     public static ServiceType getTypeByOrdinal( int type )
     {
         for ( int ii = 0; ii < values.length; ii++ )
-            if ( values[ ii ].ordinal == type ) return values[ ii ];
+        {
+            if ( values[ ii ].ordinal == type )
+            {
+                return values[ ii ];
+            }
+        }
+
         return NULL;
     }
 
@@ -129,31 +161,4 @@
     {
         return ordinal;
     }
-
-    /// PRIVATE /////
-    private final String name;
-    private final int ordinal;
-
-    /**
-     * Private constructor prevents construction outside of this class.
-     */
-    private ServiceType( int ordinal, String name )
-    {
-        this.ordinal = ordinal;
-        this.name = name;
-    }
-
-    /**
-     * These two lines are all that's necessary to export a List of VALUES.
-     */
-    private static final ServiceType[] values = { NULL, RJE, ECHO, DISCARD, USERS, DAYTIME,
QUOTE, CHARGEN, FTP_DATA,
-            FTP, TELNET, SMTP, NSW_FE, MSG_ICP, MSG_AUTH, DSP, TIME, RLP, GRAPHICS, NAMESERVER,
NICKNAME, MPM_FLAGS,
-            MPM, MPM_SND, NI_FTP, LOGIN, LA_MAINT, DOMAIN, ISI_GL, NI_MAIL, VIA_FTP, TACACS_DS,
BOOTPS, BOOTPC, TFTP,
-            NETRJS_1, NETRJS_2, NETRJS_3, NETRJS_4, FINGER, HOSTS2_NS, SU_MIT_TG, MIT_DOV,
DCP, SUPDUP, SWIFT_RVF,
-            TACNEWS, METAGRAM, HOSTNAME, ISO_TSAP, X400, X400_SND, CSNET_NS, RTELNET, POP_2,
SUNRPC, AUTH, SFTP,
-            UUCP_PATH, NNTP, ERPC, NTP, LOCUS_MAP, LOCUS_CON, PWDGEN, CISCO_FNA, CISCO_TNA,
CISCO_SYS, STATSRV,
-            INGRES_NET, LOC_SRV, PROFILE, NETBIOS_NS, NETBIOS_DGM, NETBIOS_SSN, EMFIS_DATA,
EMFIS_CNTL, BL_IDM,
-            SUR_MEAS, LINK };
-    // VALUES needs to be located here, otherwise illegal forward reference
-    public static final List VALUES = Collections.unmodifiableList( Arrays.asList( values
) );
 }



Mime
View raw message