ofbiz-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mrisal...@apache.org
Subject svn commit: r1076822 - /ofbiz/trunk/framework/base/src/org/ofbiz/base/concurrent/TTLObject.java
Date Thu, 03 Mar 2011 21:56:49 GMT
Author: mrisaliti
Date: Thu Mar  3 21:56:49 2011
New Revision: 1076822

URL: http://svn.apache.org/viewvc?rev=1076822&view=rev
Log:
Remove some warning in TTLObject (OFBIZ-4102)

Modified:
    ofbiz/trunk/framework/base/src/org/ofbiz/base/concurrent/TTLObject.java

Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/concurrent/TTLObject.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/concurrent/TTLObject.java?rev=1076822&r1=1076821&r2=1076822&view=diff
==============================================================================
--- ofbiz/trunk/framework/base/src/org/ofbiz/base/concurrent/TTLObject.java (original)
+++ ofbiz/trunk/framework/base/src/org/ofbiz/base/concurrent/TTLObject.java Thu Mar  3 21:56:49
2011
@@ -34,8 +34,8 @@ import org.ofbiz.base.lang.SourceMonitor
 public abstract class TTLObject<T> implements ObjectWrapper<T> {
     private static final ScheduledExecutorService updateExecutor = ExecutionPool.getNewOptimalExecutor("TTLObject(async-update)");
 
-    private static final <T> T getConfigForClass(ConcurrentHashMap<String, T>
config, Class c) {
-        Class ptr = c;
+    private static final <T> T getConfigForClass(ConcurrentHashMap<String, T>
config, Class<?> c) {
+        Class<?> ptr = c;
         T value = null;
         while (value == null && ptr != null) {
             value = config.get(ptr.getName());
@@ -46,15 +46,15 @@ public abstract class TTLObject<T> imple
 
     private static final ConcurrentHashMap<String, Long> ttls = new ConcurrentHashMap<String,
Long>();
 
-    public static void setDefaultTTLForClass(Class c, long ttl) {
+    public static void setDefaultTTLForClass(Class<?> c, long ttl) {
         ttls.putIfAbsent(c.getName(), ttl);
     }
 
-    public static void setTTLForClass(Class c, long ttl) {
+    public static void setTTLForClass(Class<?> c, long ttl) {
         ttls.put(c.getName(), ttl);
     }
 
-    public static long getTTLForClass(Class c) throws ConfigurationException {
+    public static long getTTLForClass(Class<?> c) throws ConfigurationException {
         Long ttl = getConfigForClass(ttls, c);
         if (ttl != null) return ttl.longValue();
         throw new ConfigurationException("No TTL defined for " + c.getName());
@@ -62,15 +62,15 @@ public abstract class TTLObject<T> imple
 
     private static final ConcurrentHashMap<String, Boolean> inForeground = new ConcurrentHashMap<String,
Boolean>();
 
-    public static void setDefaultForegroundForClass(Class c, boolean foreground) {
+    public static void setDefaultForegroundForClass(Class<?> c, boolean foreground)
{
         inForeground.putIfAbsent(c.getName(), foreground);
     }
 
-    public static void setForegroundForClass(Class c, boolean foreground) {
+    public static void setForegroundForClass(Class<?> c, boolean foreground) {
         inForeground.put(c.getName(), foreground);
     }
 
-    public static boolean getForegroundForClass(Class c) {
+    public static boolean getForegroundForClass(Class<?> c) {
         Boolean foreground = getConfigForClass(inForeground, c);
         if (foreground != null) return foreground.booleanValue();
         return true;



Mime
View raw message