directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r473103 - /directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/add/AddRequest.java
Date Thu, 09 Nov 2006 22:26:30 GMT
Author: elecharny
Date: Thu Nov  9 14:26:29 2006
New Revision: 473103

URL: http://svn.apache.org/viewvc?view=rev&rev=473103
Log:
Fixed warnings by using generics

Modified:
    directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/add/AddRequest.java

Modified: directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/add/AddRequest.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/add/AddRequest.java?view=diff&rev=473103&r1=473102&r2=473103
==============================================================================
--- directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/add/AddRequest.java
(original)
+++ directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/add/AddRequest.java
Thu Nov  9 14:26:29 2006
@@ -90,10 +90,10 @@
     private transient int attributesLength;
 
     /** The list of all attributes length */
-    private transient List attributeLength;
+    private transient List<Integer> attributeLength;
 
     /** The list of all vals length */
-    private transient List valuesLength;
+    private transient List<Integer> valuesLength;
 
 
     // ~ Constructors
@@ -244,8 +244,8 @@
         if ( ( attributes != null ) && ( attributes.size() != 0 ) )
         {
             NamingEnumeration attributeIterator = attributes.getAll();
-            attributeLength = new LinkedList();
-            valuesLength = new LinkedList();
+            attributeLength = new LinkedList<Integer>();
+            valuesLength = new LinkedList<Integer>();
 
             // Compute the attributes length
             while ( attributeIterator.hasMoreElements() )
@@ -295,8 +295,8 @@
                 // add the attribute length to the attributes length
                 attributesLength += 1 + TLV.getNbBytes( localAttributeLength ) + localAttributeLength;
 
-                attributeLength.add( new Integer( localAttributeLength ) );
-                valuesLength.add( new Integer( localValuesLength ) );
+                attributeLength.add( localAttributeLength );
+                valuesLength.add( localValuesLength );
             }
         }
 
@@ -368,11 +368,11 @@
                 // Compute the attributes length
                 while ( attributeIterator.hasMoreElements() )
                 {
-                    Attribute attribute = ( Attribute ) attributeIterator.nextElement();
+                    Attribute attribute = (Attribute)attributeIterator.nextElement();
 
                     // The attributes list sequence
                     buffer.put( UniversalTag.SEQUENCE_TAG );
-                    int localAttributeLength = ( ( Integer ) attributeLength.get( attributeNumber
) ).intValue();
+                    int localAttributeLength = attributeLength.get( attributeNumber );
                     buffer.put( TLV.getBytes( localAttributeLength ) );
 
                     // The attribute type
@@ -380,7 +380,7 @@
 
                     // The values
                     buffer.put( UniversalTag.SET_TAG );
-                    int localValuesLength = ( ( Integer ) valuesLength.get( attributeNumber
) ).intValue();
+                    int localValuesLength = valuesLength.get( attributeNumber );
                     buffer.put( TLV.getBytes( localValuesLength ) );
 
                     try



Mime
View raw message