You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by cz...@apache.org on 2007/12/10 16:12:21 UTC

svn commit: r602926 - in /incubator/sling/trunk/osgi/log/src/main/java/org/apache/sling/osgi/log: LogReaderServiceFactory.java LogSupport.java

Author: cziegeler
Date: Mon Dec 10 07:12:19 2007
New Revision: 602926

URL: http://svn.apache.org/viewvc?rev=602926&view=rev
Log:
Remove warnings and use java5 generics.

Modified:
    incubator/sling/trunk/osgi/log/src/main/java/org/apache/sling/osgi/log/LogReaderServiceFactory.java
    incubator/sling/trunk/osgi/log/src/main/java/org/apache/sling/osgi/log/LogSupport.java

Modified: incubator/sling/trunk/osgi/log/src/main/java/org/apache/sling/osgi/log/LogReaderServiceFactory.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/osgi/log/src/main/java/org/apache/sling/osgi/log/LogReaderServiceFactory.java?rev=602926&r1=602925&r2=602926&view=diff
==============================================================================
--- incubator/sling/trunk/osgi/log/src/main/java/org/apache/sling/osgi/log/LogReaderServiceFactory.java (original)
+++ incubator/sling/trunk/osgi/log/src/main/java/org/apache/sling/osgi/log/LogReaderServiceFactory.java Mon Dec 10 07:12:19 2007
@@ -75,6 +75,7 @@
             LogReaderServiceFactory.this.logSupport.removeLogListener(listener);
         }
 
+        @SuppressWarnings("unchecked")
         public Enumeration getLog() {
             return LogReaderServiceFactory.this.logSupport.getLog();
         }

Modified: incubator/sling/trunk/osgi/log/src/main/java/org/apache/sling/osgi/log/LogSupport.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/osgi/log/src/main/java/org/apache/sling/osgi/log/LogSupport.java?rev=602926&r1=602925&r2=602926&view=diff
==============================================================================
--- incubator/sling/trunk/osgi/log/src/main/java/org/apache/sling/osgi/log/LogSupport.java (original)
+++ incubator/sling/trunk/osgi/log/src/main/java/org/apache/sling/osgi/log/LogSupport.java Mon Dec 10 07:12:19 2007
@@ -145,6 +145,7 @@
         }
     }
 
+    @SuppressWarnings("unchecked")
     private final Enumeration EMPTY = new Enumeration() {
         public boolean hasMoreElements() {
             return false;
@@ -155,7 +156,8 @@
         }
     };
 
-    /* package */Enumeration getLog() {
+    /* package */@SuppressWarnings("unchecked")
+    Enumeration getLog() {
         return this.EMPTY;
     }
 
@@ -307,11 +309,11 @@
 
     // ---------- Effective logging --------------------------------------------
 
-    private Map loggers = new HashMap();
+    private Map<Long, Logger> loggers = new HashMap<Long, Logger>();
 
     private Logger getLogger(Bundle bundle) {
         Long bundleId = new Long((bundle == null) ? 0 : bundle.getBundleId());
-        Logger log = (Logger) this.loggers.get(bundleId);
+        Logger log = this.loggers.get(bundleId);
         if (log == null) {
             // TODO: use systembundle for bundle==null
             String name = (bundle == null)