Quantcast

[mule-scm] [mule][25315] branches/mule-3.2.x/core/src/main/java/org/mule/util/store/ MuleObjectStoreManager.java: MULE-6064 - fixing generics usage

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[mule-scm] [mule][25315] branches/mule-3.2.x/core/src/main/java/org/mule/util/store/ MuleObjectStoreManager.java: MULE-6064 - fixing generics usage

pablo.lagreca
[mule][25315] branches/mule-3.2.x/core/src/main/java/org/mule/util/store/MuleObjectStoreManager.java: MULE-6064 - fixing generics usage
Revision
25315
Author
pablo.lagreca
Date
2013-02-27 14:25:28 -0600 (Wed, 27 Feb 2013)

Log Message

MULE-6064 - fixing generics usage

Modified Paths

Diff

Modified: branches/mule-3.2.x/core/src/main/java/org/mule/util/store/MuleObjectStoreManager.java (25314 => 25315)


--- branches/mule-3.2.x/core/src/main/java/org/mule/util/store/MuleObjectStoreManager.java	2013-02-27 20:18:03 UTC (rev 25314)
+++ branches/mule-3.2.x/core/src/main/java/org/mule/util/store/MuleObjectStoreManager.java	2013-02-27 20:25:28 UTC (rev 25315)
@@ -46,13 +46,13 @@
     @Override
     public <T extends ObjectStore<? extends Serializable>> T getObjectStore(String name)
     {
-        return this.<T> getObjectStore(name, false);
+        return this.getObjectStore(name, false);
     }
 
     @Override
     public <T extends ObjectStore<? extends Serializable>> T getObjectStore(String name, boolean isPersistent)
     {
-        return this.<T> internalCreateStore(getBaseStore(isPersistent), name, 0, 0, 0);
+        return internalCreateStore(getBaseStore(isPersistent), name, 0, 0, 0);
     }
 
     @Override
@@ -91,17 +91,17 @@
         }
     }
 
-    private ListableObjectStore<? extends Serializable> getBaseStore(boolean persistent)
+    private <T extends ListableObjectStore<? extends Serializable>> T getBaseStore(boolean persistent)
     {
-        ListableObjectStore<?> baseStore;
+        T baseStore;
         if (persistent)
         {
-            baseStore = (ListableObjectStore<? extends Serializable>) muleContext.getRegistry().lookupObject(
+            baseStore = (T) muleContext.getRegistry().lookupObject(
                     MuleProperties.OBJECT_STORE_DEFAULT_PERSISTENT_NAME);
         }
         else
         {
-            baseStore =  (ListableObjectStore<? extends Serializable>) muleContext.getRegistry().lookupObject(
+            baseStore = (T) muleContext.getRegistry().lookupObject(
                     MuleProperties.OBJECT_STORE_DEFAULT_IN_MEMORY_NAME);
         }
         return baseStore;

To unsubscribe from this list please visit:

http://xircles.codehaus.org/manage_email

Loading...