openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mik...@apache.org
Subject svn commit: r1096876 - in /openjpa/trunk: openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/conf/ openjpa-kernel/src/main/java/org/apache/openjpa/conf/ openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/ openjpa-persistence/src...
Date Tue, 26 Apr 2011 19:54:28 GMT
Author: mikedd
Date: Tue Apr 26 19:54:27 2011
New Revision: 1096876

URL: http://svn.apache.org/viewvc?rev=1096876&view=rev
Log:
remove casts for broker factory aliases

Modified:
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/conf/JDBCProductDerivation.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/BrokerFactoryValue.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/OpenJPAProductDerivation.java
    openjpa/trunk/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/JDBCPersistenceProductDerivation.java
    openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProductDerivation.java

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/conf/JDBCProductDerivation.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/conf/JDBCProductDerivation.java?rev=1096876&r1=1096875&r2=1096876&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/conf/JDBCProductDerivation.java
(original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/conf/JDBCProductDerivation.java
Tue Apr 26 19:54:27 2011
@@ -43,7 +43,7 @@ public class JDBCProductDerivation exten
 
     public static final String PREFIX = "openjpa.jdbc"; 
     
-    public void putBrokerFactoryAliases(Map m) {
+    public void putBrokerFactoryAliases(Map<String,String> m) {
         m.put("jdbc", JDBCBrokerFactory.class.getName());
     }
 

Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/BrokerFactoryValue.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/BrokerFactoryValue.java?rev=1096876&r1=1096875&r2=1096876&view=diff
==============================================================================
--- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/BrokerFactoryValue.java
(original)
+++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/BrokerFactoryValue.java
Tue Apr 26 19:54:27 2011
@@ -44,22 +44,19 @@ public class BrokerFactoryValue
 
     private static final String[] _aliases;
     static {
-        Map aliases = new HashMap();
-        aliases.put("abstractstore", 
-            AbstractStoreBrokerFactory.class.getName());
+        Map<String, String> aliases = new HashMap<String, String>();
+        aliases.put("abstractstore", AbstractStoreBrokerFactory.class.getName());
         ProductDerivation[] ds = ProductDerivations.getProductDerivations();
         for (int i = 0; i < ds.length; i++) {
             if (ds[i] instanceof OpenJPAProductDerivation)
-                ((OpenJPAProductDerivation) ds[i]).putBrokerFactoryAliases
-                    (aliases);
+                ((OpenJPAProductDerivation) ds[i]).putBrokerFactoryAliases(aliases);
         }
 
         _aliases = new String[aliases.size() * 2];
         int i = 0;
-        for (Iterator iter = aliases.entrySet().iterator(); iter.hasNext(); ) {
-            Map.Entry e = (Map.Entry) iter.next();
-            _aliases[i++] = (String) e.getKey();
-            _aliases[i++] = (String) e.getValue();
+        for(Map.Entry<String, String>e : aliases.entrySet()) {
+            _aliases[i++] = e.getKey();
+            _aliases[i++] = e.getValue();
         }
     }
 

Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/OpenJPAProductDerivation.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/OpenJPAProductDerivation.java?rev=1096876&r1=1096875&r2=1096876&view=diff
==============================================================================
--- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/OpenJPAProductDerivation.java
(original)
+++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/OpenJPAProductDerivation.java
Tue Apr 26 19:54:27 2011
@@ -39,5 +39,5 @@ public interface OpenJPAProductDerivatio
      * alias to a broker factory class name.  Replace anything previously 
      * under the desired keys.
      */
-    public void putBrokerFactoryAliases(Map aliases);
+    public void putBrokerFactoryAliases(Map<String, String> aliases);
 }

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/JDBCPersistenceProductDerivation.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/JDBCPersistenceProductDerivation.java?rev=1096876&r1=1096875&r2=1096876&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/JDBCPersistenceProductDerivation.java
(original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/JDBCPersistenceProductDerivation.java
Tue Apr 26 19:54:27 2011
@@ -48,7 +48,7 @@ public class JDBCPersistenceProductDeriv
     implements OpenJPAProductDerivation {
     
     
-    public void putBrokerFactoryAliases(Map m) {
+    public void putBrokerFactoryAliases(Map<String,String> m) {
     }
 
     public int getType() {

Modified: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProductDerivation.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProductDerivation.java?rev=1096876&r1=1096875&r2=1096876&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProductDerivation.java
(original)
+++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProductDerivation.java
Tue Apr 26 19:54:27 2011
@@ -153,7 +153,7 @@ public class PersistenceProductDerivatio
 		_providerImplName = PersistenceProviderImpl.class.getName();
 	}
     
-    public void putBrokerFactoryAliases(Map m) {
+    public void putBrokerFactoryAliases(Map<String, String> m) {
     }
 
     public int getType() {



Mime
View raw message