db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t.@apache.org
Subject svn commit: r1357832 - in /db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque: Torque.java TorqueInstance.java avalon/Torque.java
Date Thu, 05 Jul 2012 19:43:53 GMT
Author: tv
Date: Thu Jul  5 19:43:53 2012
New Revision: 1357832

URL: http://svn.apache.org/viewvc?rev=1357832&view=rev
Log:
Attempt to fix invalid casting

Modified:
    db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/Torque.java
    db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/TorqueInstance.java
    db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/avalon/Torque.java

Modified: db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/Torque.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/Torque.java?rev=1357832&r1=1357831&r2=1357832&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/Torque.java (original)
+++ db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/Torque.java Thu
Jul  5 19:43:53 2012
@@ -192,7 +192,7 @@ public final class Torque
      *
      * @return The requested Manager.
      */
-    public static <T extends Persistent> AbstractBaseManager<T> getManager(String
name)
+    public static <T extends AbstractBaseManager<? extends Persistent>> T getManager(String
name)
     {
         return getInstance().getManager(name);
     }
@@ -206,7 +206,7 @@ public final class Torque
      *
      * @return a Manager
      */
-    public static <T extends Persistent> AbstractBaseManager<T> getManager(String
name,
+    public static <T extends AbstractBaseManager<? extends Persistent>> T getManager(String
name,
             String defaultClassName)
     {
         return getInstance().getManager(name, defaultClassName);

Modified: db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/TorqueInstance.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/TorqueInstance.java?rev=1357832&r1=1357831&r2=1357832&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/TorqueInstance.java
(original)
+++ db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/TorqueInstance.java
Thu Jul  5 19:43:53 2012
@@ -767,10 +767,10 @@ public class TorqueInstance
      * @param name name of the manager
      * @return a Manager
      */
-    public <T extends Persistent> AbstractBaseManager<T> getManager(String name)
+    public <T extends AbstractBaseManager<? extends Persistent>> T getManager(String
name)
     {
         @SuppressWarnings("unchecked")
-        AbstractBaseManager<T> m = (AbstractBaseManager<T>)managers.get(name);
+        T m = (T)managers.get(name);
         if (m == null)
         {
             log.error("No configured manager for key " + name + ".");
@@ -788,10 +788,10 @@ public class TorqueInstance
      * @return a Manager
      */
     @SuppressWarnings("unchecked")
-    public <T extends Persistent> AbstractBaseManager<T> getManager(String name,
+    public <T extends AbstractBaseManager<? extends Persistent>> T getManager(String
name,
             String defaultClassName)
     {
-        AbstractBaseManager<T> m = (AbstractBaseManager<T>)managers.get(name);
+        T m = (T)managers.get(name);
         if (m == null)
         {
             log.debug("Added late Manager mapping for Class: "
@@ -807,7 +807,7 @@ public class TorqueInstance
             }
 
             // Try again now that the default manager should be in the map
-            m = (AbstractBaseManager<T>)managers.get(name);
+            m = (T)managers.get(name);
         }
 
         return m;

Modified: db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/avalon/Torque.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/avalon/Torque.java?rev=1357832&r1=1357831&r2=1357832&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/avalon/Torque.java
(original)
+++ db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/avalon/Torque.java
Thu Jul  5 19:43:53 2012
@@ -73,7 +73,7 @@ public interface Torque
      * @param name name of the manager
      * @return a Manager
      */
-    <T extends Persistent> AbstractBaseManager<T> getManager(String name);
+    <T extends AbstractBaseManager<? extends Persistent>> T getManager(String
name);
 
     /**
      * This methods returns either the Manager from the configuration file,
@@ -83,7 +83,7 @@ public interface Torque
      * @param defaultClassName the class to use if name has not been configured
      * @return a Manager
      */
-    <T extends Persistent> AbstractBaseManager<T> getManager(String name, String
defaultClassName);
+    <T extends AbstractBaseManager<? extends Persistent>> T getManager(String
name, String defaultClassName);
 
     /**
      * Returns the default database map information.



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


Mime
View raw message