db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From to...@apache.org
Subject svn commit: r373311 - /db/ojb/trunk/src/test/org/apache/ojb/broker/CollectionTest2.java
Date Sun, 29 Jan 2006 13:26:10 GMT
Author: tomdz
Date: Sun Jan 29 05:26:01 2006
New Revision: 373311

URL: http://svn.apache.org/viewcvs?rev=373311&view=rev
Log:
Replaced usages of String#contains which is a Java5 method (and caused Gump to fail)

Modified:
    db/ojb/trunk/src/test/org/apache/ojb/broker/CollectionTest2.java

Modified: db/ojb/trunk/src/test/org/apache/ojb/broker/CollectionTest2.java
URL: http://svn.apache.org/viewcvs/db/ojb/trunk/src/test/org/apache/ojb/broker/CollectionTest2.java?rev=373311&r1=373310&r2=373311&view=diff
==============================================================================
--- db/ojb/trunk/src/test/org/apache/ojb/broker/CollectionTest2.java (original)
+++ db/ojb/trunk/src/test/org/apache/ojb/broker/CollectionTest2.java Sun Jan 29 05:26:01 2006
@@ -7,7 +7,6 @@
 import java.util.List;
 
 import org.apache.commons.lang.SerializationUtils;
-import org.apache.commons.lang.StringUtils;
 import org.apache.ojb.broker.accesslayer.sql.SqlGenerator;
 import org.apache.ojb.broker.core.proxy.ProxyFactory;
 import org.apache.ojb.broker.metadata.ClassDescriptor;
@@ -762,8 +761,8 @@
         ClassDescriptor cd = broker.getClassDescriptor(queryBySubDeveloper.getBaseClass());
         SqlGenerator sqlg = broker.serviceSqlGenerator();
         String sql = sqlg.getPreparedSelectStatement(queryBySubDeveloper, cd).getStatement();
-        assertFalse(sql.contains("OUTER JOIN"));
-        assertTrue(sql.contains("INNER JOIN"));
+        assertFalse(sql.indexOf("OUTER JOIN") >= 0);
+        assertTrue(sql.indexOf("INNER JOIN") >= 0);
 
         // generates OUTER joins between COL_2_SUB_PROJECT_SELF and COL_2_SUB_PROJECT_SELF
and COL_2_DEVELOPER_SELF 
         QueryByCriteria queryBySubDeveloper2 = createQueryFor(SubProjectSelfRef.class, "subProjects.developers.name",
@@ -777,8 +776,8 @@
         cd = broker.getClassDescriptor(queryBySubDeveloper2.getBaseClass());
         sqlg = broker.serviceSqlGenerator();
         sql = sqlg.getPreparedSelectStatement(queryBySubDeveloper2, cd).getStatement();
-        assertTrue(sql.contains("OUTER JOIN"));
-        assertFalse(sql.contains("INNER JOIN"));
+        assertTrue(sql.indexOf("OUTER JOIN") >= 0);
+        assertFalse(sql.indexOf("INNER JOIN") >= 0);
     }
 
 



---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Mime
View raw message