You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2007/12/13 01:52:57 UTC
svn commit: r603793 - in /directory:
apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/
shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/schema/
Author: elecharny
Date: Wed Dec 12 16:52:56 2007
New Revision: 603793
URL: http://svn.apache.org/viewvc?rev=603793&view=rev
Log:
Removed some warnings by using generics
Modified:
directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/LeafEvaluator.java
directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/schema/ByteArrayComparator.java
directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/schema/MatchingRule.java
Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/LeafEvaluator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/LeafEvaluator.java?rev=603793&r1=603792&r2=603793&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/LeafEvaluator.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/LeafEvaluator.java Wed Dec 12 16:52:56 2007
@@ -124,7 +124,7 @@
* @throws NamingException
*/
private boolean matchValue( SimpleNode node, Attribute attr, AttributeType type, Normalizer normalizer,
- Comparator<Object> comparator ) throws NamingException
+ Comparator comparator ) throws NamingException
{
// get the normalized AVA filter value
Object filterValue = node.getValue();
@@ -286,7 +286,7 @@
* and use the comparator to determine if a match exists.
*/
Normalizer normalizer = getNormalizer( attrId, ORDERING_MATCH );
- Comparator<Object> comparator = getComparator( attrId, ORDERING_MATCH );
+ Comparator comparator = getComparator( attrId, ORDERING_MATCH );
Object filterValue = node.getValue();
NamingEnumeration list = attr.getAll();
@@ -438,7 +438,7 @@
// Get the normalizer and comparator for this attributeType
Normalizer normalizer = getNormalizer( filterAttr, EQUALITY_MATCH );
- Comparator<Object> comparator = getComparator( filterAttr, EQUALITY_MATCH );
+ Comparator<?> comparator = getComparator( filterAttr, EQUALITY_MATCH );
/*
* Get the attribute and if it is not set in rec then resusitate it
@@ -530,7 +530,7 @@
* @throws NamingException if there is a failure
*/
@SuppressWarnings("unchecked")
- private Comparator<Object> getComparator( String attrId, int matchType ) throws NamingException
+ private Comparator<?> getComparator( String attrId, int matchType ) throws NamingException
{
MatchingRule mrule = getMatchingRule( attrId, matchType );
Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/schema/ByteArrayComparator.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/schema/ByteArrayComparator.java?rev=603793&r1=603792&r2=603793&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/schema/ByteArrayComparator.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/schema/ByteArrayComparator.java Wed Dec 12 16:52:56 2007
@@ -29,14 +29,14 @@
* @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
* @version $Rev$
*/
-public class ByteArrayComparator implements Comparator
+public class ByteArrayComparator implements Comparator<byte[]>
{
- public static final ByteArrayComparator INSTANCE = new ByteArrayComparator();
+ public static final Comparator<byte[]> INSTANCE = new ByteArrayComparator();
/* (non-Javadoc)
* @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
*/
- public int compare( Object o1, Object o2 )
+ public int compare( byte[] o1, byte[] o2 )
{
byte[] b1 = ( byte[] ) o1;
byte[] b2 = ( byte[] ) o2;
@@ -73,6 +73,7 @@
}
int minLength = Math.min( b1.length, b2.length );
+
for ( int ii = 0; ii < minLength; ii++ )
{
if ( b1[ii] > b2[ii] )
Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/schema/MatchingRule.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/schema/MatchingRule.java?rev=603793&r1=603792&r2=603793&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/schema/MatchingRule.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/schema/MatchingRule.java Wed Dec 12 16:52:56 2007
@@ -95,7 +95,7 @@
* @throws NamingException
* if there is a failure resolving the object
*/
- Comparator getComparator() throws NamingException;
+ Comparator<?> getComparator() throws NamingException;
/**