Title: [1405] trunk/qdox/src/test/java/com/thoughtworks/qdox: Fix Type.equals(), use JavaType and ignore dimensions for FQN, these have already been added
Revision
1405
Author
rfscholte
Date
2011-10-12 14:19:21 -0500 (Wed, 12 Oct 2011)

Log Message

Fix Type.equals(), use JavaType and ignore dimensions for FQN, these have already been added

Modified Paths

Diff

Modified: trunk/qdox/src/main/java/com/thoughtworks/qdox/model/Type.java (1404 => 1405)

--- trunk/qdox/src/main/java/com/thoughtworks/qdox/model/Type.java	2011-10-11 21:52:30 UTC (rev 1404)
+++ trunk/qdox/src/main/java/com/thoughtworks/qdox/model/Type.java	2011-10-12 19:19:21 UTC (rev 1405)
@@ -297,12 +297,12 @@
         {
             return true;
         }
-        if ( !( obj instanceof Type ) )
+        if ( !( obj instanceof JavaType ) )
         {
             return false;
         }
-        Type t = (Type) obj;
-        return getFullyQualifiedName().equals( t.getFullyQualifiedName() ) && t.getDimensions() == getDimensions();
+        JavaType t = (JavaType) obj;
+        return getFullyQualifiedName().equals( t.getFullyQualifiedName() );
     }
 
     @Override

Modified: trunk/qdox/src/test/java/com/thoughtworks/qdox/JavaProjectBuilderTest.java (1404 => 1405)

--- trunk/qdox/src/test/java/com/thoughtworks/qdox/JavaProjectBuilderTest.java	2011-10-11 21:52:30 UTC (rev 1404)
+++ trunk/qdox/src/test/java/com/thoughtworks/qdox/JavaProjectBuilderTest.java	2011-10-12 19:19:21 UTC (rev 1405)
@@ -474,13 +474,12 @@
         assertEquals(2, propertyClass.getConstructors().size());
 
         JavaConstructor ctor = propertyClass.getConstructor(null);
-        JavaConstructor ctor2 = propertyClass.getConstructor(Collections.singletonList((JavaType) propertyClass.asType()));
+        JavaConstructor ctor2 = propertyClass.getConstructor(Collections.singletonList((JavaType) propertyClass));
         JavaMethod getFoo = propertyClass.getMethodBySignature("getFoo", null);
         JavaMethod isBar = propertyClass.getMethodBySignature("isBar", null);
         JavaMethod get = propertyClass.getMethodBySignature("get", null);
-        Type intType = mock( Type.class );
+        JavaType intType = mock( JavaType.class );
         when( intType.getFullyQualifiedName() ).thenReturn( "int" );
-        when( intType.getDimensions() ).thenReturn( 0 );
         JavaMethod set = propertyClass.getMethodBySignature( "set", Collections.singletonList( (JavaType) intType ) );
 
         JavaMethod protectedMethod = propertyClass.getMethodBySignature("protectedMethod", null);


To unsubscribe from this list please visit:

http://xircles.codehaus.org/manage_email

Reply via email to