openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mtyle...@apache.org
Subject svn commit: r1180577 - /openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/query/TestQueryEscapeCharacters.java
Date Sun, 09 Oct 2011 10:34:23 GMT
Author: mtylenda
Date: Sun Oct  9 10:34:23 2011
New Revision: 1180577

URL: http://svn.apache.org/viewvc?rev=1180577&view=rev
Log:
OPENJPA-2056: Remove unnecessary casts from test case.

Modified:
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/query/TestQueryEscapeCharacters.java

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/query/TestQueryEscapeCharacters.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/query/TestQueryEscapeCharacters.java?rev=1180577&r1=1180576&r2=1180577&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/query/TestQueryEscapeCharacters.java
(original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/query/TestQueryEscapeCharacters.java
Sun Oct  9 10:34:23 2011
@@ -90,7 +90,7 @@ public class TestQueryEscapeCharacters
     }
 
     public void testDoubleSlashQuery() {
-        // get the Dictionary and check the alwaysAddSearchString flag
+        // get the Dictionary and check the requiresSearchStringEscapeForLike flag
         OpenJPAEntityManagerFactorySPI ojpaEmf = 
             (OpenJPAEntityManagerFactorySPI) emf;
         JDBCConfiguration conf = (JDBCConfiguration)ojpaEmf.getConfiguration();
@@ -105,8 +105,7 @@ public class TestQueryEscapeCharacters
 
     @SuppressWarnings("unchecked")
     public void testDifferentEscapeCharacter () {
-        OpenJPAEntityManagerFactorySPI ojpaEmf = 
-            (OpenJPAEntityManagerFactorySPI) emf;
+        OpenJPAEntityManagerFactorySPI ojpaEmf = emf;
         JDBCConfiguration conf = (JDBCConfiguration)ojpaEmf.getConfiguration();
 
         // Would be nice to just pass a map to the createEntityManager, but
@@ -118,7 +117,7 @@ public class TestQueryEscapeCharacters
 
         Query q = em.createNamedQuery("Employee.findByName");
         q.setParameter("name", "M|%%");
-        List<Employee> emps = (List<Employee>) q.getResultList();
+        List<Employee> emps = q.getResultList();
         assertEquals(1, emps.size());
 
         String unnamedQuery =
@@ -126,7 +125,7 @@ public class TestQueryEscapeCharacters
 
         q = em.createQuery(unnamedQuery);
         q.setParameter("name", "M|%%");
-        emps = (List<Employee>) q.getResultList();
+        emps = q.getResultList();
         assertEquals(1, emps.size());
         em.close();
     }
@@ -138,7 +137,7 @@ public class TestQueryEscapeCharacters
 
         Query q = em.createNamedQuery(namedQuery);
         q.setParameter("name", parameter);
-        List<Employee> emps = (List<Employee>) q.getResultList();
+        List<Employee> emps = q.getResultList();
         assertEquals(expected, emps.size());
 
         String unnamedQuery =
@@ -149,7 +148,7 @@ public class TestQueryEscapeCharacters
         }
         q = em.createQuery(unnamedQuery);
         q.setParameter("name", parameter);
-        emps = (List<Employee>) q.getResultList();
+        emps = q.getResultList();
         assertEquals(expected, emps.size());
         em.close();
     }



Mime
View raw message