felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fmesc...@apache.org
Subject svn commit: r1228221 [1/2] - in /felix/trunk/webconsole: ./ src/main/java/org/apache/felix/webconsole/ src/main/java/org/apache/felix/webconsole/internal/ src/main/java/org/apache/felix/webconsole/internal/compendium/ src/main/java/org/apache/felix/web...
Date Fri, 06 Jan 2012 15:03:19 GMT
Author: fmeschbe
Date: Fri Jan  6 15:03:17 2012
New Revision: 1228221

URL: http://svn.apache.org/viewvc?rev=1228221&view=rev
Log:
FELIX-3283 Revert generification, using annotations, and improved for-loops (commit #1215540)
  - keep Java 1.4 animal sniffer plugin
  - export webconsole from pom again (but add provide:=true for proper re-import)

Removed:
    felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/package-info.java
Modified:
    felix/trunk/webconsole/pom.xml
    felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/AbstractWebConsolePlugin.java
    felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/DefaultVariableResolver.java
    felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/SimpleWebConsolePlugin.java
    felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/WebConsoleUtil.java
    felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/Util.java
    felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/WebConsolePluginAdapter.java
    felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/ConfigManager.java
    felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/ConfigManagerBase.java
    felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/ConfigurationAdminConfigurationPrinter.java
    felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/LogServlet.java
    felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/WireAdminConfigurationPrinter.java
    felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/BundlesConfigurationPrinter.java
    felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/BundlesServlet.java
    felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/PermissionsConfigurationPrinter.java
    felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/ServicesServlet.java
    felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/i18n/CombinedEnumeration.java
    felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/i18n/CombinedResourceBundle.java
    felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/i18n/ConsolePropertyResourceBundle.java
    felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/i18n/ResourceBundleCache.java
    felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/i18n/ResourceBundleManager.java
    felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/misc/ConfigurationPrinterAdapter.java
    felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/misc/ConfigurationRender.java
    felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/misc/LicenseServlet.java
    felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/misc/SystemPropertiesPrinter.java
    felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/misc/ThreadPrinter.java
    felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/servlet/ConfigurationSupport.java
    felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/servlet/ConfigurationUtil.java
    felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/servlet/OsgiManager.java
    felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/servlet/PluginHolder.java
    felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/system/VMStatPlugin.java
    felix/trunk/webconsole/src/test/java/org/apache/felix/webconsole/AbstractWebConsolePluginTest.java

Modified: felix/trunk/webconsole/pom.xml
URL: http://svn.apache.org/viewvc/felix/trunk/webconsole/pom.xml?rev=1228221&r1=1228220&r2=1228221&view=diff
==============================================================================
--- felix/trunk/webconsole/pom.xml (original)
+++ felix/trunk/webconsole/pom.xml Fri Jan  6 15:03:17 2012
@@ -81,14 +81,6 @@
                     </execution>
                 </executions>
             </plugin>
-            <!-- Allow certain Java 5 features, generate Java 1.4 class files -->
-            <plugin>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <configuration>
-                    <source>5</source>
-                    <target>jsr14</target>
-                </configuration>
-            </plugin>
             <!-- Make sure to not use non Java 1.4 API -->
             <plugin>
                 <groupId>org.codehaus.mojo</groupId>
@@ -129,6 +121,9 @@
                         <Bundle-Activator>
                             org.apache.felix.webconsole.internal.OsgiManagerActivator
                         </Bundle-Activator>
+                        <Export-Package>
+                            org.apache.felix.webconsole;version=3.1.2;provide:=true
+                        </Export-Package>
                         <Import-Package>
                             org.osgi.service.metatype;resolution:=optional,
                             javax.servlet.*;version=2.4,
@@ -276,13 +271,5 @@
             <optional>true</optional>
         </dependency>
         
-        <!-- BND annotations -->
-        <dependency>
-            <groupId>biz.aQute</groupId>
-            <artifactId>bndlib</artifactId>
-            <version>1.50.0</version>
-            <scope>provided</scope>
-        </dependency>
-        
     </dependencies>
 </project>

Modified: felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/AbstractWebConsolePlugin.java
URL: http://svn.apache.org/viewvc/felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/AbstractWebConsolePlugin.java?rev=1228221&r1=1228220&r2=1228221&view=diff
==============================================================================
--- felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/AbstractWebConsolePlugin.java (original)
+++ felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/AbstractWebConsolePlugin.java Fri Jan  6 15:03:17 2012
@@ -22,7 +22,6 @@ import java.lang.reflect.*;
 import java.net.URL;
 import java.net.URLConnection;
 import java.util.*;
-import java.util.Map.Entry;
 
 import javax.servlet.ServletConfig;
 import javax.servlet.ServletContext;
@@ -175,7 +174,7 @@ public abstract class AbstractWebConsole
      * @param request the original request passed from the HTTP server
      * @return <code>true</code> if the page should have headers and footers rendered
      */
-    protected boolean isHtmlRequest( @SuppressWarnings("unused") final HttpServletRequest request )
+    protected boolean isHtmlRequest( final HttpServletRequest request )
     {
         return true;
     }
@@ -338,7 +337,7 @@ public abstract class AbstractWebConsole
         {
             try
             {
-                Class<?> cl = resourceProvider.getClass();
+                Class cl = resourceProvider.getClass();
                 while ( tmpGetResourceMethod == null && cl != Object.class )
                 {
                     Method[] methods = cl.getDeclaredMethods();
@@ -622,14 +621,15 @@ public abstract class AbstractWebConsole
 
         boolean disabled = false;
         String appRoot = ( String ) request.getAttribute( WebConsoleConstants.ATTR_APP_ROOT );
-        @SuppressWarnings("unchecked")
-        Map<String, String> labelMap = ( Map<String, String> ) request.getAttribute( WebConsoleConstants.ATTR_LABEL_MAP );
+        Map labelMap = ( Map ) request.getAttribute( WebConsoleConstants.ATTR_LABEL_MAP );
         if ( labelMap != null )
         {
 
             // prepare the navigation
-            SortedMap<String, String> map = new TreeMap<String, String>( String.CASE_INSENSITIVE_ORDER );
-            for (Entry<String, String> labelMapEntry : labelMap.entrySet()) {
+            SortedMap map = new TreeMap( String.CASE_INSENSITIVE_ORDER );
+            for ( Iterator ri = labelMap.entrySet().iterator(); ri.hasNext(); )
+            {
+                Map.Entry labelMapEntry = ( Map.Entry ) ri.next();
                 if ( labelMapEntry.getKey() == null )
                 {
                     // ignore renders without a label
@@ -656,7 +656,7 @@ public abstract class AbstractWebConsole
 
             // render the navigation
             pw.println("<div id='technav' class='ui-widget ui-widget-header'>"); //$NON-NLS-1$
-            for ( Iterator<String> li = map.values().iterator(); li.hasNext(); )
+            for ( Iterator li = map.values().iterator(); li.hasNext(); )
             {
                 pw.print(' ');
                 pw.println( li.next() );
@@ -666,8 +666,7 @@ public abstract class AbstractWebConsole
         }
 
         // render lang-box
-        @SuppressWarnings("unchecked")
-        Map<String, String> langMap = (Map<String, String>) request.getAttribute(WebConsoleConstants.ATTR_LANG_MAP);
+        Map langMap = (Map) request.getAttribute(WebConsoleConstants.ATTR_LANG_MAP);
         if (null != langMap && !langMap.isEmpty())
         {
             // determine the currently selected locale from the request and fail-back
@@ -690,7 +689,7 @@ public abstract class AbstractWebConsole
             printLocaleElement(pw, appRoot, locale, langMap.get(locale));
             pw.println(" </span>"); //$NON-NLS-1$
             pw.println(" <span class='flags ui-helper-hidden'>"); //$NON-NLS-1$
-            for (Iterator<String> li = langMap.keySet().iterator(); li.hasNext();)
+            for (Iterator li = langMap.keySet().iterator(); li.hasNext();)
             {
                 // <img src="us.gif" alt="en" title="English"/>
                 final Object l = li.next();
@@ -870,7 +869,7 @@ public abstract class AbstractWebConsole
         return readTemplateFile( getClass(), templateFile );
     }
 
-    private final String readTemplateFile( final Class<?> clazz, final String templateFile)
+    private final String readTemplateFile( final Class clazz, final String templateFile)
     {
         InputStream templateStream = clazz.getResourceAsStream( templateFile );
         if ( templateStream != null )

Modified: felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/DefaultVariableResolver.java
URL: http://svn.apache.org/viewvc/felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/DefaultVariableResolver.java?rev=1228221&r1=1228220&r2=1228221&view=diff
==============================================================================
--- felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/DefaultVariableResolver.java (original)
+++ felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/DefaultVariableResolver.java Fri Jan  6 15:03:17 2012
@@ -31,7 +31,7 @@ import java.util.Map;
  * {@link WebConsoleUtil#getVariableResolver(javax.servlet.ServletRequest)}
  * as the variable resolver if none has yet been assigned to the request.
  */
-public class DefaultVariableResolver extends HashMap<String, String> implements VariableResolver
+public class DefaultVariableResolver extends HashMap implements VariableResolver
 {
 
     private static final long serialVersionUID = 4148807223433047780L;
@@ -48,7 +48,7 @@ public class DefaultVariableResolver ext
 
     /**
      * Creates a new variable resolver and initializes both - capacity & load factor
-     *
+     * 
      * @param initialCapacity  the initial capacity of the variable container
      * @param loadFactor the load factor of the variable container
      * @see HashMap#HashMap(int, float)
@@ -61,7 +61,7 @@ public class DefaultVariableResolver ext
 
     /**
      * Creates a new variable resolver with specified initial capacity
-     *
+     * 
      * @param initialCapacity  the initial capacity of the variable container
      * @see HashMap#HashMap(int)
      */
@@ -73,11 +73,11 @@ public class DefaultVariableResolver ext
 
     /**
      * Creates a new variable resolver copying the variables from the given map.
-     *
+     * 
      * @param source  the map whose variables are to be placed in this resolver.
      * @see HashMap#HashMap(Map)
      */
-    public DefaultVariableResolver( final Map<String, String> source )
+    public DefaultVariableResolver( final Map source )
     {
         super( source );
     }

Modified: felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/SimpleWebConsolePlugin.java
URL: http://svn.apache.org/viewvc/felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/SimpleWebConsolePlugin.java?rev=1228221&r1=1228220&r2=1228221&view=diff
==============================================================================
--- felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/SimpleWebConsolePlugin.java (original)
+++ felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/SimpleWebConsolePlugin.java Fri Jan  6 15:03:17 2012
@@ -22,6 +22,7 @@ package org.apache.felix.webconsole;
 import java.net.URL;
 import java.util.HashMap;
 import java.util.Hashtable;
+import java.util.Iterator;
 import java.util.Map;
 
 import org.osgi.framework.BundleContext;
@@ -56,7 +57,7 @@ public abstract class SimpleWebConsolePl
     private ServiceRegistration reg;
 
     // used to obtain services. Structure is: service name -> ServiceTracker
-    private final Map<String, ServiceTracker> services = new HashMap<String, ServiceTracker>();
+    private final Map services = new HashMap();
 
 
     /**
@@ -150,7 +151,7 @@ public abstract class SimpleWebConsolePl
         {
             activate( bc ); // don't know why this is needed!
 
-            Hashtable<String, String> props = new Hashtable<String, String>();
+            Hashtable props = new Hashtable();
             props.put( WebConsoleConstants.PLUGIN_LABEL, label );
             props.put( WebConsoleConstants.PLUGIN_TITLE, title );
             reg = bc.registerService( "javax.servlet.Servlet", this, props ); //$NON-NLS-1$
@@ -189,7 +190,7 @@ public abstract class SimpleWebConsolePl
      */
     public final Object getService( String serviceName )
     {
-        ServiceTracker serviceTracker = services.get( serviceName );
+        ServiceTracker serviceTracker = ( ServiceTracker ) services.get( serviceName );
         if ( serviceTracker == null )
         {
             serviceTracker = new ServiceTracker( getBundleContext(), serviceName, null );
@@ -211,11 +212,12 @@ public abstract class SimpleWebConsolePl
      */
     public void deactivate()
     {
-        for ( ServiceTracker tracker : services.values() )
+        for ( Iterator ti = services.values().iterator(); ti.hasNext(); )
         {
+            ServiceTracker tracker = ( ServiceTracker ) ti.next();
             tracker.close();
+            ti.remove();
         }
-        services.clear();
         super.deactivate();
     }
 

Modified: felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/WebConsoleUtil.java
URL: http://svn.apache.org/viewvc/felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/WebConsoleUtil.java?rev=1228221&r1=1228220&r2=1228221&view=diff
==============================================================================
--- felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/WebConsoleUtil.java (original)
+++ felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/WebConsoleUtil.java Fri Jan  6 15:03:17 2012
@@ -23,6 +23,7 @@ import java.io.IOException;
 import java.lang.reflect.Array;
 import java.net.URLDecoder;
 import java.util.HashMap;
+import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 
@@ -83,8 +84,8 @@ public final class WebConsoleUtil
 
         final DefaultVariableResolver resolver = new DefaultVariableResolver();
         // FIXME: don't we need a constant for the values below?
-        resolver.put( "appRoot", (String) request.getAttribute( WebConsoleConstants.ATTR_APP_ROOT ) ); //$NON-NLS-1$
-        resolver.put( "pluginRoot", (String) request.getAttribute( WebConsoleConstants.ATTR_PLUGIN_ROOT ) ); //$NON-NLS-1$
+        resolver.put( "appRoot", request.getAttribute( WebConsoleConstants.ATTR_APP_ROOT ) ); //$NON-NLS-1$
+        resolver.put( "pluginRoot", request.getAttribute( WebConsoleConstants.ATTR_PLUGIN_ROOT ) ); //$NON-NLS-1$
         setVariableResolver( request, resolver );
         return resolver;
     }
@@ -130,8 +131,7 @@ public final class WebConsoleUtil
         }
 
         // check, whether we already have the parameters
-        @SuppressWarnings("unchecked")
-        Map<String, FileItem[]> params = ( Map<String, FileItem[]> ) request.getAttribute( AbstractWebConsolePlugin.ATTR_FILEUPLOAD );
+        Map params = ( Map ) request.getAttribute( AbstractWebConsolePlugin.ATTR_FILEUPLOAD );
         if ( params == null )
         {
             // parameters not read yet, read now
@@ -144,13 +144,14 @@ public final class WebConsoleUtil
             upload.setSizeMax( -1 );
 
             // Parse the request
-            params = new HashMap<String, FileItem[]>();
+            params = new HashMap();
             try
             {
-                @SuppressWarnings("unchecked")
-                List<FileItem> items = upload.parseRequest( request );
-                for (final FileItem fi : items) {
-                    FileItem[] current = params.get( fi.getFieldName() );
+                List items = upload.parseRequest( request );
+                for ( Iterator fiter = items.iterator(); fiter.hasNext(); )
+                {
+                    FileItem fi = ( FileItem ) fiter.next();
+                    FileItem[] current = ( FileItem[] ) params.get( fi.getFieldName() );
                     if ( current == null )
                     {
                         current = new FileItem[]
@@ -173,7 +174,7 @@ public final class WebConsoleUtil
             request.setAttribute( AbstractWebConsolePlugin.ATTR_FILEUPLOAD, params );
         }
 
-        FileItem[] param = params.get( name );
+        FileItem[] param = ( FileItem[] ) params.get( name );
         if ( param != null )
         {
             for ( int i = 0; i < param.length; i++ )
@@ -349,7 +350,6 @@ public final class WebConsoleUtil
      * @param value the value to decode
      * @return the decoded string
      */
-    @SuppressWarnings("deprecation")
     public static String urlDecode( final String value )
     {
         // shortcut for empty or missing values

Modified: felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/Util.java
URL: http://svn.apache.org/viewvc/felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/Util.java?rev=1228221&r1=1228220&r2=1228221&view=diff
==============================================================================
--- felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/Util.java (original)
+++ felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/Util.java Fri Jan  6 15:03:17 2012
@@ -133,21 +133,21 @@ public class Util
      * @param e the enumeration which to convert
      * @return the list containing all enumeration entries.
      */
-    public static final <T> ArrayList<T> list( Enumeration<T> e )
+    public static final ArrayList list( Enumeration e )
     {
-        ArrayList<T> l = new ArrayList<T>();
+        ArrayList l = new ArrayList();
         while ( e.hasMoreElements() )
         {
             l.add( e.nextElement() );
         }
         return l;
     }
-
+    
     /**
      * This method expects a locale string in format language_COUNTRY, or
      * language. The method will determine which is the correct form of locale
      * string and construct a <code>Locale</code> object.
-     *
+     * 
      * @param locale the locale string, if <code>null</code> - default locale is
      *          returned
      * @return a locale object
@@ -180,7 +180,7 @@ public class Util
         return new Locale(language, country);
     }
 
-    private static final class BundleNameComparator implements Comparator<Bundle>
+    private static final class BundleNameComparator implements Comparator
     {
         private final Locale locale;
 
@@ -191,6 +191,12 @@ public class Util
         }
 
 
+        public int compare( Object o1, Object o2 )
+        {
+            return compare( ( Bundle ) o1, ( Bundle ) o2 );
+        }
+
+
         public int compare( Bundle b1, Bundle b2 )
         {
 

Modified: felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/WebConsolePluginAdapter.java
URL: http://svn.apache.org/viewvc/felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/WebConsolePluginAdapter.java?rev=1228221&r1=1228220&r2=1228221&view=diff
==============================================================================
--- felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/WebConsolePluginAdapter.java (original)
+++ felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/WebConsolePluginAdapter.java Fri Jan  6 15:03:17 2012
@@ -248,14 +248,14 @@ public class WebConsolePluginAdapter ext
         }
         else if ( value != null )
         {
-            final Collection<?> cssListColl;
+            final Collection cssListColl;
             if ( value.getClass().isArray() )
             {
                 cssListColl = Arrays.asList( ( Object[] ) value );
             }
             else if ( value instanceof Collection )
             {
-                cssListColl = ( Collection<?> ) value;
+                cssListColl = ( Collection ) value;
             }
             else
             {
@@ -266,7 +266,7 @@ public class WebConsolePluginAdapter ext
             {
                 String[] entries = new String[cssListColl.size()];
                 int i = 0;
-                for ( Iterator<?> cli = cssListColl.iterator(); cli.hasNext(); i++ )
+                for ( Iterator cli = cssListColl.iterator(); cli.hasNext(); i++ )
                 {
                     entries[i] = String.valueOf( cli.next() );
                 }

Modified: felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/ConfigManager.java
URL: http://svn.apache.org/viewvc/felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/ConfigManager.java?rev=1228221&r1=1228220&r2=1228221&view=diff
==============================================================================
--- felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/ConfigManager.java (original)
+++ felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/ConfigManager.java Fri Jan  6 15:03:17 2012
@@ -26,6 +26,7 @@ import java.util.Collections;
 import java.util.Dictionary;
 import java.util.Enumeration;
 import java.util.Hashtable;
+import java.util.Iterator;
 import java.util.List;
 import java.util.Locale;
 import java.util.Map;
@@ -64,7 +65,6 @@ import org.osgi.service.metatype.ObjectC
 /**
  * The <code>ConfigManager</code> TODO
  */
-@SuppressWarnings("serial")
 public class ConfigManager extends ConfigManagerBase
 {
     private static final String LABEL = "configMgr"; // was name
@@ -286,10 +286,11 @@ public class ConfigManager extends Confi
             try
             {
                 pw.write( "[" );
-                final Map<String, String> services = this.getServices( pid, pidFilter, locale, false );
+                final Map services = this.getServices( pid, pidFilter, locale, false );
                 boolean printColon = false;
-                for ( final String servicePid : services.keySet() )
+                for ( Iterator spi = services.keySet().iterator(); spi.hasNext(); )
                 {
+                    final String servicePid = ( String ) spi.next();
                     final Configuration config = getConfiguration( ca, servicePid );
                     if ( config != null )
                     {
@@ -438,12 +439,13 @@ public class ConfigManager extends Confi
     {
         try
         {
-            Map<String, String> optionsFactory = getServices(ManagedServiceFactory.class.getName(),
+            Map optionsFactory = getServices(ManagedServiceFactory.class.getName(),
                 pidFilter, locale, true);
             addMetaTypeNames(optionsFactory, getFactoryPidObjectClasses(locale),
                 pidFilter, ConfigurationAdmin.SERVICE_FACTORYPID);
-            for ( String id : optionsFactory.keySet() )
+            for ( Iterator ii = optionsFactory.keySet().iterator(); ii.hasNext(); )
             {
+                String id = ( String ) ii.next();
                 Object name = optionsFactory.get( id );
                 json.append( "fpids", new JSONObject().put( "id", id ).put( "name", name ) );
             }
@@ -460,7 +462,7 @@ public class ConfigManager extends Confi
         try
         {
             // start with ManagedService instances
-            Map<String, String> optionsPlain = getServices(ManagedService.class.getName(), pidFilter,
+            Map optionsPlain = getServices(ManagedService.class.getName(), pidFilter,
                 locale, true);
 
             // next are the MetaType informations without ManagedService
@@ -504,8 +506,9 @@ public class ConfigManager extends Confi
                 }
             }
 
-            for ( String id : optionsPlain.keySet() )
+            for ( Iterator ii = optionsPlain.keySet().iterator(); ii.hasNext(); )
             {
+                String id = ( String ) ii.next();
                 Object name = optionsPlain.get( id );
 
                 final Configuration config = getConfiguration( ca, id );
@@ -554,11 +557,11 @@ public class ConfigManager extends Confi
     }
 
 
-    private SortedMap<String, String> getServices( String serviceClass, String serviceFilter, String locale,
+    private SortedMap getServices( String serviceClass, String serviceFilter, String locale,
         boolean ocdRequired ) throws InvalidSyntaxException
     {
         // sorted map of options
-        SortedMap<String, String> optionsFactory = new TreeMap<String, String>( String.CASE_INSENSITIVE_ORDER );
+        SortedMap optionsFactory = new TreeMap( String.CASE_INSENSITIVE_ORDER );
 
         // find all ManagedServiceFactories to get the factoryPIDs
         ServiceReference[] refs = this.getBundleContext().getServiceReferences( serviceClass, serviceFilter );
@@ -590,7 +593,7 @@ public class ConfigManager extends Confi
     }
 
 
-    private void addMetaTypeNames( final Map<String, String> pidMap, final Map<String, ObjectClassDefinition> ocdCollection, final String filterSpec, final String type )
+    private void addMetaTypeNames( final Map pidMap, final Map ocdCollection, final String filterSpec, final String type )
     {
         Filter filter = null;
         if ( filterSpec != null )
@@ -605,17 +608,18 @@ public class ConfigManager extends Confi
             }
         }
 
-        for ( Entry<String, ObjectClassDefinition> ociEntry : ocdCollection.entrySet() )
+        for ( Iterator ei = ocdCollection.entrySet().iterator(); ei.hasNext(); )
         {
-            final String pid = ociEntry.getKey();
-            final ObjectClassDefinition ocd = ociEntry.getValue();
+            Entry ociEntry = ( Entry ) ei.next();
+            final String pid = ( String ) ociEntry.getKey();
+            final ObjectClassDefinition ocd = ( ObjectClassDefinition ) ociEntry.getValue();
             if ( filter == null )
             {
                 pidMap.put( pid, ocd.getName() );
             }
             else
             {
-                final Dictionary<String, String> props = new Hashtable<String, String>();
+                final Dictionary props = new Hashtable();
                 props.put( type, pid );
                 if ( filter.match( props ) )
                 {
@@ -649,7 +653,6 @@ public class ConfigManager extends Confi
     }
 
 
-    @SuppressWarnings("unchecked")
     private void configForm( JSONWriter json, String pid, Configuration config, String pidFilter, String locale )
         throws JSONException
     {
@@ -663,7 +666,7 @@ public class ConfigManager extends Confi
             json.value( pidFilter );
         }
 
-        Dictionary<String, ?> props = null;
+        Dictionary props = null;
         ObjectClassDefinition ocd;
         if ( config != null )
         {
@@ -677,7 +680,7 @@ public class ConfigManager extends Confi
 
         if ( props == null )
         {
-            props = new Hashtable<String, Object>();
+            props = new Hashtable();
         }
 
         if ( ocd != null )
@@ -693,9 +696,9 @@ public class ConfigManager extends Confi
                     + "of the OSGi Metatype Service or the absence of a MetaType descriptor for this configuration." );
 
             json.key( "properties" ).object();
-            for ( Enumeration<String> pe = props.keys(); pe.hasMoreElements(); )
+            for ( Enumeration pe = props.keys(); pe.hasMoreElements(); )
             {
-                final String id = pe.nextElement();
+                final String id = ( String ) pe.nextElement();
 
                 // ignore well known special properties
                 if ( !id.equals( Constants.SERVICE_PID ) && !id.equals( Constants.SERVICE_DESCRIPTION )
@@ -719,7 +722,7 @@ public class ConfigManager extends Confi
     }
 
 
-    private void mergeWithMetaType( Dictionary<String, ?> props, ObjectClassDefinition ocd, JSONWriter json ) throws JSONException
+    private void mergeWithMetaType( Dictionary props, ObjectClassDefinition ocd, JSONWriter json ) throws JSONException
     {
         json.key( "title" ).value( ocd.getName() );
 
@@ -732,8 +735,9 @@ public class ConfigManager extends Confi
         if ( ad != null )
         {
             json.key( "properties" ).object();
-            for ( AttributeDefinition adi : ad )
+            for ( int i = 0; i < ad.length; i++ )
             {
+                final AttributeDefinition adi = ad[i];
                 final String attrId = adi.getID();
                 json.key( attrId );
                 attributeToJson( json, adi, props.get( attrId ) );
@@ -769,8 +773,7 @@ public class ConfigManager extends Confi
             }
             else
             {
-                @SuppressWarnings("unchecked")
-                Dictionary<String, ?> headers = bundle.getHeaders( locale );
+                Dictionary headers = bundle.getHeaders( locale );
                 String name = ( String ) headers.get( Constants.BUNDLE_NAME );
                 if ( name == null )
                 {
@@ -839,19 +842,18 @@ public class ConfigManager extends Confi
         {
             config = getConfiguration( ca, pid, factoryPid );
 
-            @SuppressWarnings("unchecked")
-            Dictionary<String, Object> props = config.getProperties();
+            Dictionary props = config.getProperties();
             if ( props == null )
             {
-                props = new Hashtable<String, Object>();
+                props = new Hashtable();
             }
 
-            Map<String, AttributeDefinition> adMap = this.getAttributeDefinitionMap( config, null );
+            Map adMap = this.getAttributeDefinitionMap( config, null );
             StringTokenizer propTokens = new StringTokenizer( propertyList, "," );
             while ( propTokens.hasMoreTokens() )
             {
                 String propName = propTokens.nextToken();
-                AttributeDefinition ad = adMap.get( propName );
+                AttributeDefinition ad = (AttributeDefinition) adMap.get( propName );
 
                 // try to derive from current value
                 if (ad == null) {
@@ -890,7 +892,7 @@ public class ConfigManager extends Confi
                 else
                 {
                     // array or vector of any type
-                    Vector<Object> vec = new Vector<Object>();
+                    Vector vec = new Vector();
 
                     String[] properties = request.getParameterValues( propName );
                     if ( properties != null )
@@ -1019,7 +1021,7 @@ public class ConfigManager extends Confi
             }
             else if ( value instanceof Vector )
             {
-                value = ( ( Vector<?> ) value ).get( 0 );
+                value = ( ( Vector ) value ).get( 0 );
             }
             else if ( value.getClass().isArray() )
             {
@@ -1057,7 +1059,7 @@ public class ConfigManager extends Confi
     {
         int attrType;
         int attrCardinality;
-        Class<?> type;
+        Class type;
 
         if ( value == null )
         {
@@ -1067,7 +1069,7 @@ public class ConfigManager extends Confi
         else if ( value instanceof Collection )
         {
             attrCardinality = Integer.MIN_VALUE;
-            Collection<?> coll = ( Collection<?> ) value;
+            Collection coll = ( Collection ) value;
             if ( coll.isEmpty() )
             {
                 type = String.class;
@@ -1172,11 +1174,11 @@ public class ConfigManager extends Confi
     }
 
 
-    private static List<?> toList( Object value )
+    private static List toList( Object value )
     {
         if ( value instanceof Vector )
         {
-            return ( Vector<?> ) value;
+            return ( Vector ) value;
         }
         else if ( value.getClass().isArray() )
         {
@@ -1199,9 +1201,9 @@ public class ConfigManager extends Confi
     }
 
 
-    private static void setPasswordProps( final Vector<Object> vec, final String[] properties, Object props )
+    private static void setPasswordProps( final Vector vec, final String[] properties, Object props )
     {
-        List<?> propList = toList( props );
+        List propList = toList( props );
         for ( int i = 0; i < properties.length; i++ )
         {
             if ( PASSWORD_PLACEHOLDER_VALUE.equals( properties[i] ) )
@@ -1219,7 +1221,7 @@ public class ConfigManager extends Confi
     }
 
 
-    private static final Object toArray( int type, Vector<?> values )
+    private static final Object toArray( int type, Vector values )
     {
         int size = values.size();
 
@@ -1306,7 +1308,6 @@ public class ConfigManager extends Confi
         }
 
 
-        @SuppressWarnings("rawtypes")
         public Dictionary getProperties()
         {
             // dummy configuration has no properties
@@ -1320,7 +1321,7 @@ public class ConfigManager extends Confi
         }
 
 
-        public void update( @SuppressWarnings("rawtypes") Dictionary properties )
+        public void update( Dictionary properties )
         {
             // dummy configuration cannot be updated
         }

Modified: felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/ConfigManagerBase.java
URL: http://svn.apache.org/viewvc/felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/ConfigManagerBase.java?rev=1228221&r1=1228220&r2=1228221&view=diff
==============================================================================
--- felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/ConfigManagerBase.java (original)
+++ felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/ConfigManagerBase.java Fri Jan  6 15:03:17 2012
@@ -75,7 +75,7 @@ abstract class ConfigManagerBase extends
      * @param locale The name of the locale to get the meta data for.
      * @return see the method description
      */
-    protected Map<String, ObjectClassDefinition> getPidObjectClasses( final String locale )
+    protected Map getPidObjectClasses( final String locale )
     {
         return getObjectClassDefinitions( PID_GETTER, locale );
     }
@@ -90,7 +90,7 @@ abstract class ConfigManagerBase extends
      * @param locale The name of the locale to get the meta data for.
      * @return see the method description
      */
-    protected Map<String, ObjectClassDefinition> getFactoryPidObjectClasses( final String locale )
+    protected Map getFactoryPidObjectClasses( final String locale )
     {
         return getObjectClassDefinitions( FACTORY_PID_GETTER, locale );
     }
@@ -109,9 +109,9 @@ abstract class ConfigManagerBase extends
      * @return Map of <code>ObjectClassDefinition</code> objects indexed by the
      *      PID (or factory PID) to which they pertain
      */
-    private Map<String, ObjectClassDefinition> getObjectClassDefinitions( final IdGetter idGetter, final String locale )
+    private Map getObjectClassDefinitions( final IdGetter idGetter, final String locale )
     {
-        final Map<String, ObjectClassDefinition> objectClassesDefinitions = new HashMap<String, ObjectClassDefinition>();
+        final Map objectClassesDefinitions = new HashMap();
         final MetaTypeService mts = this.getMetaTypeService();
         if ( mts != null )
         {
@@ -242,9 +242,9 @@ abstract class ConfigManagerBase extends
     }
 
 
-    protected Map<String, AttributeDefinition> getAttributeDefinitionMap( Configuration config, String locale )
+    protected Map getAttributeDefinitionMap( Configuration config, String locale )
     {
-        Map<String, AttributeDefinition> adMap = new HashMap<String, AttributeDefinition>();
+        Map adMap = new HashMap();
         ObjectClassDefinition ocd = this.getObjectClassDefinition( config, locale );
         if ( ocd != null )
         {

Modified: felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/ConfigurationAdminConfigurationPrinter.java
URL: http://svn.apache.org/viewvc/felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/ConfigurationAdminConfigurationPrinter.java?rev=1228221&r1=1228220&r2=1228221&view=diff
==============================================================================
--- felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/ConfigurationAdminConfigurationPrinter.java (original)
+++ felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/ConfigurationAdminConfigurationPrinter.java Fri Jan  6 15:03:17 2012
@@ -71,15 +71,15 @@ public class ConfigurationAdminConfigura
                 Configuration[] configs = ca.listConfigurations( null );
                 if ( configs != null && configs.length > 0 )
                 {
-                    SortedMap<String, Configuration> sm = new TreeMap<String, Configuration>();
+                    SortedMap sm = new TreeMap();
                     for ( int i = 0; i < configs.length; i++ )
                     {
                         sm.put( configs[i].getPid(), configs[i] );
                     }
 
-                    for ( Iterator<Configuration> mi = sm.values().iterator(); mi.hasNext(); )
+                    for ( Iterator mi = sm.values().iterator(); mi.hasNext(); )
                     {
-                        this.printConfiguration( pw, mi.next() );
+                        this.printConfiguration( pw, ( Configuration ) mi.next() );
                     }
                 }
                 else
@@ -111,18 +111,18 @@ public class ConfigurationAdminConfigura
         String loc = ( config.getBundleLocation() != null ) ? config.getBundleLocation() : "Unbound";
         ConfigurationRender.infoLine( pw, "  ", "BundleLocation", loc );
 
-        @SuppressWarnings("unchecked")
-        Dictionary<String, ?> props = config.getProperties();
+        Dictionary props = config.getProperties();
         if ( props != null )
         {
-            SortedSet<String> keys = new TreeSet<String>();
-            for ( Enumeration<String> ke = props.keys(); ke.hasMoreElements(); )
+            SortedSet keys = new TreeSet();
+            for ( Enumeration ke = props.keys(); ke.hasMoreElements(); )
             {
                 keys.add( ke.nextElement() );
             }
 
-            for ( String key : keys )
+            for ( Iterator ki = keys.iterator(); ki.hasNext(); )
             {
+                String key = ( String ) ki.next();
                 ConfigurationRender.infoLine( pw, "  ", key, props.get( key ) );
             }
         }

Modified: felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/LogServlet.java
URL: http://svn.apache.org/viewvc/felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/LogServlet.java?rev=1228221&r1=1228220&r2=1228221&view=diff
==============================================================================
--- felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/LogServlet.java (original)
+++ felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/LogServlet.java Fri Jan  6 15:03:17 2012
@@ -39,7 +39,6 @@ import org.osgi.service.log.LogService;
 /**
  * LogServlet provides support for reading the log messages.
  */
-@SuppressWarnings("serial")
 public class LogServlet extends SimpleWebConsolePlugin implements OsgiManagerPlugin
 {
     private static final String LABEL = "logs";
@@ -95,7 +94,7 @@ public class LogServlet extends SimpleWe
             if ( logReaderService != null )
             {
                 int index = 0;
-                for ( Enumeration<?> logEntries = logReaderService.getLog(); logEntries.hasMoreElements()
+                for ( Enumeration logEntries = logReaderService.getLog(); logEntries.hasMoreElements()
                     && index < MAX_LOGS; )
                 {
                     LogEntry nextLog = ( LogEntry ) logEntries.nextElement();

Modified: felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/WireAdminConfigurationPrinter.java
URL: http://svn.apache.org/viewvc/felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/WireAdminConfigurationPrinter.java?rev=1228221&r1=1228220&r2=1228221&view=diff
==============================================================================
--- felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/WireAdminConfigurationPrinter.java (original)
+++ felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/WireAdminConfigurationPrinter.java Fri Jan  6 15:03:17 2012
@@ -170,7 +170,7 @@ public final class WireAdminConfiguratio
             }
         }
 
-        Class<?>[] flavors = wire.getFlavors();
+        Class[] flavors = wire.getFlavors();
         if (flavors == null)
         {
             pw.println("  Flavors: none");
@@ -187,7 +187,7 @@ public final class WireAdminConfiguratio
             pw.println();
         }
 
-        Dictionary<?, ?> props = wire.getProperties();
+        Dictionary props = wire.getProperties();
         if (props == null)
         {
             pw.println("  Properties: none");
@@ -195,7 +195,7 @@ public final class WireAdminConfiguratio
         else
         {
             pw.println("  Properties: ");
-            for (Enumeration<?> e = props.keys(); e.hasMoreElements();)
+            for (Enumeration e = props.keys(); e.hasMoreElements();)
             {
                 final Object key = e.nextElement();
                 pw.print("    "); //$NON-NLS-1$

Modified: felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/BundlesConfigurationPrinter.java
URL: http://svn.apache.org/viewvc/felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/BundlesConfigurationPrinter.java?rev=1228221&r1=1228220&r2=1228221&view=diff
==============================================================================
--- felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/BundlesConfigurationPrinter.java (original)
+++ felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/BundlesConfigurationPrinter.java Fri Jan  6 15:03:17 2012
@@ -20,6 +20,7 @@ package org.apache.felix.webconsole.inte
 import java.io.PrintWriter;
 import java.text.MessageFormat;
 import java.util.*;
+
 import org.apache.felix.webconsole.internal.AbstractConfigurationPrinter;
 import org.osgi.framework.*;
 import org.osgi.service.packageadmin.PackageAdmin;
@@ -102,7 +103,7 @@ public class BundlesConfigurationPrinter
     {
         final Bundle[] bundles = this.getBundleContext().getBundles();
         // create a map for sorting first
-        final TreeMap<String, String> bundlesMap = new TreeMap<String, String>();
+        final TreeMap bundlesMap = new TreeMap();
         int active = 0, installed = 0, resolved = 0, fragments = 0;
         for( int i =0; i<bundles.length; i++)
         {
@@ -175,9 +176,12 @@ public class BundlesConfigurationPrinter
         }
         pw.println(buffer.toString());
         pw.println("-----------------------------------------------------------------------------");
-        for ( final String bundle : bundlesMap.values() )
+        final Iterator i = bundlesMap.entrySet().iterator();
+        while ( i.hasNext() )
         {
-            pw.println( bundle );
+            final Map.Entry entry = (Map.Entry)i.next();
+            pw.println(entry.getValue());
+
         }
     }
 

Modified: felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/BundlesServlet.java
URL: http://svn.apache.org/viewvc/felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/BundlesServlet.java?rev=1228221&r1=1228220&r2=1228221&view=diff
==============================================================================
--- felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/BundlesServlet.java (original)
+++ felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/BundlesServlet.java Fri Jan  6 15:03:17 2012
@@ -49,7 +49,6 @@ import org.osgi.service.startlevel.Start
  * the list of bundles, installed on the framework. It also adds ability to control
  * the lifecycle of the bundles, like start, stop, uninstall, install.
  */
-@SuppressWarnings("serial")
 public class BundlesServlet extends SimpleWebConsolePlugin implements OsgiManagerPlugin, ConfigurationPrinter
 {
 
@@ -119,7 +118,7 @@ public class BundlesServlet extends Simp
             bootPkgs[i] = bootDelegation;
         }
 
-        Hashtable<String, Object> props = new Hashtable<String, Object>();
+        Hashtable props = new Hashtable();
         props.put( WebConsoleConstants.CONFIG_PRINTER_MODES, new String[] { ConfigurationPrinter.MODE_TXT,
             ConfigurationPrinter.MODE_ZIP } );
         configurationPrinter = bundleContext.registerService( ConfigurationPrinter.SERVICE, this, props );
@@ -466,7 +465,7 @@ public class BundlesServlet extends Simp
         // prepare variables
         DefaultVariableResolver vars = ( ( DefaultVariableResolver ) WebConsoleUtil.getVariableResolver( request ) );
         vars.put( "startLevel", String.valueOf(startLevel));
-        vars.put( "drawDetails", String.valueOf(reqInfo.bundleRequested));
+        vars.put( "drawDetails", reqInfo.bundleRequested ? Boolean.TRUE : Boolean.FALSE );
         vars.put( "currentBundle", (reqInfo.bundleRequested && reqInfo.bundle != null ? String.valueOf(reqInfo.bundle.getBundleId()) : "null"));
 
         final String pluginRoot = ( String ) request.getAttribute( WebConsoleConstants.ATTR_PLUGIN_ROOT );
@@ -519,7 +518,7 @@ public class BundlesServlet extends Simp
         else if (filter != null)
         {
             Filter f = getBundleContext().createFilter(filter);
-            ArrayList<Bundle> list = new ArrayList<Bundle>(allBundles.length);
+            ArrayList list = new ArrayList(allBundles.length);
             final String localeString = locale.toString();
             for (int i = 0, size = allBundles.length; i < size; i++)
             {
@@ -719,8 +718,7 @@ public class BundlesServlet extends Simp
     private final void bundleDetails( JSONWriter jw, Bundle bundle, final String pluginRoot, final String servicesRoot, final Locale locale)
         throws JSONException
     {
-        @SuppressWarnings("unchecked")
-        Dictionary<String, String> headers = bundle.getHeaders( locale == null ? null : locale.toString() );
+        Dictionary headers = bundle.getHeaders( locale == null ? null : locale.toString() );
 
         jw.key( "props" );
         jw.array();
@@ -729,7 +727,7 @@ public class BundlesServlet extends Simp
         WebConsoleUtil.keyVal( jw, "Bundle Location", bundle.getLocation() );
         WebConsoleUtil.keyVal( jw, "Last Modification", new Date( bundle.getLastModified() ) );
 
-        String docUrl = headers.get( Constants.BUNDLE_DOCURL );
+        String docUrl = ( String ) headers.get( Constants.BUNDLE_DOCURL );
         if ( docUrl != null )
         {
             WebConsoleUtil.keyVal( jw, "Bundle Documentation", docUrl );
@@ -789,18 +787,24 @@ public class BundlesServlet extends Simp
             return;
         }
 
-        Map<String, Bundle> usingBundles = new TreeMap<String, Bundle>();
+        Map usingBundles = new TreeMap();
 
         ExportedPackage[] exports = packageAdmin.getExportedPackages( bundle );
         if ( exports != null && exports.length > 0 )
         {
             // do alphabetical sort
-            Arrays.sort( exports, new Comparator<ExportedPackage>()
+            Arrays.sort( exports, new Comparator()
             {
                 public int compare( ExportedPackage p1, ExportedPackage p2 )
                 {
                     return p1.getName().compareTo( p2.getName() );
                 }
+
+
+                public int compare( Object o1, Object o2 )
+                {
+                    return compare( ( ExportedPackage ) o1, ( ExportedPackage ) o2 );
+                }
             } );
 
             JSONArray val = new JSONArray();
@@ -831,7 +835,7 @@ public class BundlesServlet extends Simp
         if ( exports != null && exports.length > 0 )
         {
             // collect import packages first
-            final List<ExportedPackage> imports = new ArrayList<ExportedPackage>();
+            final List imports = new ArrayList();
             for ( int i = 0; i < exports.length; i++ )
             {
                 final ExportedPackage ep = exports[i];
@@ -850,14 +854,20 @@ public class BundlesServlet extends Simp
             JSONArray val = new JSONArray();
             if ( imports.size() > 0 )
             {
-                final ExportedPackage[] packages = imports.toArray( new ExportedPackage[imports
+                final ExportedPackage[] packages = ( ExportedPackage[] ) imports.toArray( new ExportedPackage[imports
                     .size()] );
-                Arrays.sort( packages, new Comparator<ExportedPackage>()
+                Arrays.sort( packages, new Comparator()
                 {
                     public int compare( ExportedPackage p1, ExportedPackage p2 )
                     {
                         return p1.getName().compareTo( p2.getName() );
                     }
+
+
+                    public int compare( Object o1, Object o2 )
+                    {
+                        return compare( ( ExportedPackage ) o1, ( ExportedPackage ) o2 );
+                    }
                 } );
                 // and finally print out
                 for ( int i = 0; i < packages.length; i++ )
@@ -878,8 +888,9 @@ public class BundlesServlet extends Simp
         if ( !usingBundles.isEmpty() )
         {
             JSONArray val = new JSONArray();
-            for ( final Bundle usingBundle : usingBundles.values() )
+            for ( Iterator ui = usingBundles.values().iterator(); ui.hasNext(); )
             {
+                Bundle usingBundle = ( Bundle ) ui.next();
                 val.put( getBundleDescriptor( usingBundle, pluginRoot ) );
             }
             WebConsoleUtil.keyVal( jw, "Importing Bundles", val );
@@ -889,22 +900,27 @@ public class BundlesServlet extends Simp
 
     private void listImportExportsUnresolved( JSONWriter jw, Bundle bundle, final String pluginRoot ) throws JSONException
     {
-        @SuppressWarnings("unchecked")
-        Dictionary<String, String> dict = bundle.getHeaders();
+        Dictionary dict = bundle.getHeaders();
 
-        String target = dict.get( Constants.EXPORT_PACKAGE );
+        String target = ( String ) dict.get( Constants.EXPORT_PACKAGE );
         if ( target != null )
         {
             Clause[] pkgs = Parser.parseHeader( target );
             if ( pkgs != null && pkgs.length > 0 )
             {
                 // do alphabetical sort
-                Arrays.sort( pkgs, new Comparator<Clause>()
+                Arrays.sort( pkgs, new Comparator()
                 {
                     public int compare( Clause p1, Clause p2 )
                     {
                         return p1.getName().compareTo( p2.getName() );
                     }
+
+
+                    public int compare( Object o1, Object o2 )
+                    {
+                        return compare( ( Clause) o1, ( Clause ) o2 );
+                    }
                 } );
 
                 JSONArray val = new JSONArray();
@@ -921,13 +937,13 @@ public class BundlesServlet extends Simp
             }
         }
 
-        target = dict.get( Constants.IMPORT_PACKAGE );
+        target = ( String ) dict.get( Constants.IMPORT_PACKAGE );
         if ( target != null )
         {
             Clause[] pkgs = Parser.parseHeader( target );
             if ( pkgs != null && pkgs.length > 0 )
             {
-                Map<String, Clause> imports = new TreeMap<String, Clause>();
+                Map imports = new TreeMap();
                 for ( int i = 0; i < pkgs.length; i++ )
                 {
                     Clause pkg = pkgs[i];
@@ -935,7 +951,7 @@ public class BundlesServlet extends Simp
                 }
 
                 // collect import packages first
-                final Map<String, ExportedPackage> candidates = new HashMap<String, ExportedPackage>();
+                final Map candidates = new HashMap();
                 PackageAdmin packageAdmin = getPackageAdmin();
                 if ( packageAdmin != null )
                 {
@@ -947,7 +963,7 @@ public class BundlesServlet extends Simp
                         {
                             final ExportedPackage ep = exports[i];
 
-                            Clause imp = imports.get( ep.getName() );
+                            Clause imp = ( Clause ) imports.get( ep.getName() );
                             if ( imp != null && isSatisfied( imp, ep ) )
                             {
                                 candidates.put( ep.getName(), ep );
@@ -960,8 +976,10 @@ public class BundlesServlet extends Simp
                 JSONArray val = new JSONArray();
                 if ( imports.size() > 0 )
                 {
-                    for (final Clause r4Import : imports.values()) {
-                        ExportedPackage ep = candidates.get( r4Import.getName() );
+                    for ( Iterator ii = imports.values().iterator(); ii.hasNext(); )
+                    {
+                        Clause r4Import = ( Clause ) ii.next();
+                        ExportedPackage ep = ( ExportedPackage ) candidates.get( r4Import.getName() );
 
                         // if there is no matching export, check whether this
                         // bundle has the package, ignore the entry in this case
@@ -990,11 +1008,13 @@ public class BundlesServlet extends Simp
         }
     }
 
-    private String getServiceID(ServiceReference ref, final String servicesRoot) {
+    private String getServiceID(ServiceReference ref, final String servicesRoot)
+    {
         String id = ref.getProperty( Constants.SERVICE_ID ).toString();
         StringBuffer val = new StringBuffer();
 
-        if ( servicesRoot != null ) {
+        if ( servicesRoot != null )
+        {
             val.append( "<a href='" ).append( servicesRoot ).append( id ).append( "'>" );
             val.append( id );
             val.append( "</a>" );
@@ -1040,9 +1060,8 @@ public class BundlesServlet extends Simp
     {
         JSONArray val = new JSONArray();
 
-        @SuppressWarnings("unchecked")
-        Dictionary<String, String> headers = bundle.getHeaders(""); // don't localize at all - raw headers
-        Enumeration<String> he = headers.keys();
+        Dictionary headers = bundle.getHeaders(""); // don't localize at all - raw headers
+        Enumeration he = headers.keys();
         while ( he.hasMoreElements() )
         {
             Object header = he.nextElement();
@@ -1396,9 +1415,7 @@ public class BundlesServlet extends Simp
     {
 
         // get the uploaded data
-        @SuppressWarnings("unchecked")
-        final Map<String, FileItem[]> params = ( Map<String, FileItem[]> ) request
-            .getAttribute( AbstractWebConsolePlugin.ATTR_FILEUPLOAD );
+        final Map params = ( Map ) request.getAttribute( AbstractWebConsolePlugin.ATTR_FILEUPLOAD );
         if ( params == null )
         {
             return;
@@ -1471,9 +1488,9 @@ public class BundlesServlet extends Simp
     }
 
 
-    private FileItem getParameter( Map<String, FileItem[]> params, String name )
+    private FileItem getParameter( Map params, String name )
     {
-        FileItem[] items = params.get( name );
+        FileItem[] items = ( FileItem[] ) params.get( name );
         if ( items != null )
         {
             for ( int i = 0; i < items.length; i++ )
@@ -1490,10 +1507,10 @@ public class BundlesServlet extends Simp
     }
 
 
-    private FileItem[] getFileItems( Map<String, FileItem[]> params, String name )
+    private FileItem[] getFileItems( Map params, String name )
     {
-        final List<FileItem> files = new ArrayList<FileItem>();
-        FileItem[] items = params.get( name );
+        final List files = new ArrayList();
+        FileItem[] items = ( FileItem[] ) params.get( name );
         if ( items != null )
         {
             for ( int i = 0; i < items.length; i++ )
@@ -1505,7 +1522,7 @@ public class BundlesServlet extends Simp
             }
         }
 
-        return files.toArray( new FileItem[files.size()] );
+        return ( FileItem[] ) files.toArray( new FileItem[files.size()] );
     }
 
 

Modified: felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/PermissionsConfigurationPrinter.java
URL: http://svn.apache.org/viewvc/felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/PermissionsConfigurationPrinter.java?rev=1228221&r1=1228220&r2=1228221&view=diff
==============================================================================
--- felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/PermissionsConfigurationPrinter.java (original)
+++ felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/PermissionsConfigurationPrinter.java Fri Jan  6 15:03:17 2012
@@ -102,7 +102,7 @@ public final class PermissionsConfigurat
                 try
                 {
                     getAccessDecision = ConditionalPermissionInfo.class.getMethod( "getAccessDecision",
-                        ( Class<?>[] ) null );
+                        ( Class[] ) null );
                 }
                 catch (Throwable t)
                 {
@@ -112,7 +112,7 @@ public final class PermissionsConfigurat
                 boolean hasPermissions = false;
                 //final java.util.List list = cpa.newConditionalPermissionUpdate().getConditionalPermissionInfos();
                 //for (int i = 0; list != null && i < list.size(); i++)
-                for (Enumeration<?> e = cpa.getConditionalPermissionInfos(); e.hasMoreElements();)
+                for (Enumeration e = cpa.getConditionalPermissionInfos(); e.hasMoreElements();)
                 {
                     hasPermissions = true;
                     //final ConditionalPermissionInfo info = (ConditionalPermissionInfo) list.get(i);

Modified: felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/ServicesServlet.java
URL: http://svn.apache.org/viewvc/felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/ServicesServlet.java?rev=1228221&r1=1228220&r2=1228221&view=diff
==============================================================================
--- felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/ServicesServlet.java (original)
+++ felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/ServicesServlet.java Fri Jan  6 15:03:17 2012
@@ -46,7 +46,6 @@ import org.osgi.framework.ServiceReferen
 /**
  * ServicesServlet provides a plugin for inspecting the registered services.
  */
-@SuppressWarnings("serial")
 public class ServicesServlet extends SimpleWebConsolePlugin implements OsgiManagerPlugin
 {
     // don't create empty reference array all the time, create it only once - it is immutable

Modified: felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/i18n/CombinedEnumeration.java
URL: http://svn.apache.org/viewvc/felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/i18n/CombinedEnumeration.java?rev=1228221&r1=1228220&r2=1228221&view=diff
==============================================================================
--- felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/i18n/CombinedEnumeration.java (original)
+++ felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/i18n/CombinedEnumeration.java Fri Jan  6 15:03:17 2012
@@ -32,28 +32,28 @@ import java.util.Set;
  * So if both enumerations would produce the same result, say "123", only the
  * first would be returned.
  */
-class CombinedEnumeration<E> implements Enumeration<E>
+class CombinedEnumeration implements Enumeration
 {
 
     // the first enumeration to iterate
-    private final Enumeration<E> first;
+    private final Enumeration first;
 
     // the second enumeration to iterate once the first is exhausted
-    private final Enumeration<E> second;
+    private final Enumeration second;
 
     // the set of values already returned to prevent duplicate entries
-    private final Set<E> seenKeys;
+    private final Set seenKeys;
 
     // preview to the next return value for nextElement(), null at the end
-    private E nextKey;
+    private Object nextKey;
 
 
-    CombinedEnumeration( final Enumeration<E> first, final Enumeration<E> second )
+    CombinedEnumeration( final Enumeration first, final Enumeration second )
     {
         this.first = first;
         this.second = second;
 
-        this.seenKeys = new HashSet<E>();
+        this.seenKeys = new HashSet();
         this.nextKey = seek();
     }
 
@@ -64,14 +64,14 @@ class CombinedEnumeration<E> implements 
     }
 
 
-    public E nextElement()
+    public Object nextElement()
     {
         if ( !hasMoreElements() )
         {
             throw new NoSuchElementException();
         }
 
-        E result = nextKey;
+        Object result = nextKey;
         nextKey = seek();
         return result;
     }
@@ -82,11 +82,11 @@ class CombinedEnumeration<E> implements 
      * (unique) element is available, null is returned. The element returned
      * is also added to the set of seen elements to prevent duplicate provision
      */
-    private E seek()
+    private Object seek()
     {
         while ( first.hasMoreElements() )
         {
-            final E next = first.nextElement();
+            final Object next = first.nextElement();
             if ( !seenKeys.contains( next ) )
             {
                 seenKeys.add( next );
@@ -95,7 +95,7 @@ class CombinedEnumeration<E> implements 
         }
         while ( second.hasMoreElements() )
         {
-            final E next = second.nextElement();
+            final Object next = second.nextElement();
             if ( !seenKeys.contains( next ) )
             {
                 seenKeys.add( next );

Modified: felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/i18n/CombinedResourceBundle.java
URL: http://svn.apache.org/viewvc/felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/i18n/CombinedResourceBundle.java?rev=1228221&r1=1228220&r2=1228221&view=diff
==============================================================================
--- felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/i18n/CombinedResourceBundle.java (original)
+++ felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/i18n/CombinedResourceBundle.java Fri Jan  6 15:03:17 2012
@@ -48,9 +48,9 @@ class CombinedResourceBundle extends Res
     }
 
 
-    public Enumeration<String> getKeys()
+    public Enumeration getKeys()
     {
-        return new CombinedEnumeration<String>( resourceBundle.getKeys(), defaultResourceBundle.getKeys() );
+        return new CombinedEnumeration( resourceBundle.getKeys(), defaultResourceBundle.getKeys() );
     }
 
 

Modified: felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/i18n/ConsolePropertyResourceBundle.java
URL: http://svn.apache.org/viewvc/felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/i18n/ConsolePropertyResourceBundle.java?rev=1228221&r1=1228220&r2=1228221&view=diff
==============================================================================
--- felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/i18n/ConsolePropertyResourceBundle.java (original)
+++ felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/i18n/ConsolePropertyResourceBundle.java Fri Jan  6 15:03:17 2012
@@ -22,10 +22,7 @@ package org.apache.felix.webconsole.inte
 import java.io.IOException;
 import java.io.InputStream;
 import java.net.URL;
-import java.util.Dictionary;
 import java.util.Enumeration;
-import java.util.Hashtable;
-import java.util.Map.Entry;
 import java.util.Properties;
 import java.util.ResourceBundle;
 
@@ -35,14 +32,14 @@ import org.apache.commons.io.IOUtils;
 class ConsolePropertyResourceBundle extends ResourceBundle
 {
 
-    private final Dictionary<String, String> props;
+    private final Properties props;
 
 
     ConsolePropertyResourceBundle( final ResourceBundle parent, final URL source )
     {
         setParent( parent );
 
-        Properties props = new Properties();
+        props = new Properties();
         if ( source != null )
         {
             InputStream ins = null;
@@ -58,19 +55,14 @@ class ConsolePropertyResourceBundle exte
             {
                 IOUtils.closeQuietly( ins );
             }
-        }
 
-        this.props = new Hashtable<String, String>();
-        for ( Entry<?, ?> entry : props.entrySet() )
-        {
-            this.props.put( ( String ) entry.getKey(), ( String ) entry.getValue() );
         }
     }
 
 
-    public Enumeration<String> getKeys()
+    public Enumeration getKeys()
     {
-        return new CombinedEnumeration<String>( props.keys(), parent.getKeys() );
+        return new CombinedEnumeration( props.keys(), parent.getKeys() );
     }
 
 

Modified: felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/i18n/ResourceBundleCache.java
URL: http://svn.apache.org/viewvc/felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/i18n/ResourceBundleCache.java?rev=1228221&r1=1228220&r2=1228221&view=diff
==============================================================================
--- felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/i18n/ResourceBundleCache.java (original)
+++ felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/i18n/ResourceBundleCache.java Fri Jan  6 15:03:17 2012
@@ -46,15 +46,15 @@ class ResourceBundleCache
 
     private final Bundle bundle;
 
-    private final Map<Locale, ResourceBundle> resourceBundles;
+    private final Map resourceBundles;
 
-    private Map<String, URL> resourceBundleEntries;
+    private Map resourceBundleEntries;
 
 
     ResourceBundleCache( final Bundle bundle )
     {
         this.bundle = bundle;
-        this.resourceBundles = new HashMap<Locale, ResourceBundle>();
+        this.resourceBundles = new HashMap();
     }
 
 
@@ -78,7 +78,7 @@ class ResourceBundleCache
 
         synchronized ( resourceBundles )
         {
-            ResourceBundle bundle = resourceBundles.get( locale );
+            ResourceBundle bundle = ( ResourceBundle ) resourceBundles.get( locale );
             if ( bundle != null )
             {
                 return bundle;
@@ -99,12 +99,12 @@ class ResourceBundleCache
     private ResourceBundle loadResourceBundle( final ResourceBundle parent, final Locale locale )
     {
         final String path = "_" + locale.toString(); //$NON-NLS-1$
-        final URL source = getResourceBundleEntries().get( path );
+        final URL source = ( URL ) getResourceBundleEntries().get( path );
         return new ConsolePropertyResourceBundle( parent, source );
     }
 
 
-    private synchronized Map<String, URL> getResourceBundleEntries()
+    private synchronized Map getResourceBundleEntries()
     {
         if ( this.resourceBundleEntries == null )
         {
@@ -125,15 +125,14 @@ class ResourceBundleCache
             String fileName = file.substring( slash + 1 );
             String path = ( slash <= 0 ) ? "/" : file.substring( 0, slash ); //$NON-NLS-1$
 
-            HashMap<String, URL> resourceBundleEntries = new HashMap<String, URL>();
+            HashMap resourceBundleEntries = new HashMap();
 
-            @SuppressWarnings("unchecked")
-            Enumeration<URL> locales = bundle.findEntries( path, fileName + "*.properties", false ); //$NON-NLS-1$
+            Enumeration locales = bundle.findEntries( path, fileName + "*.properties", false ); //$NON-NLS-1$
             if ( locales != null )
             {
                 while ( locales.hasMoreElements() )
                 {
-                    URL entry = locales.nextElement();
+                    URL entry = ( URL ) locales.nextElement();
 
                     // calculate the key
                     String entryPath = entry.getPath();

Modified: felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/i18n/ResourceBundleManager.java
URL: http://svn.apache.org/viewvc/felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/i18n/ResourceBundleManager.java?rev=1228221&r1=1228220&r2=1228221&view=diff
==============================================================================
--- felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/i18n/ResourceBundleManager.java (original)
+++ felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/i18n/ResourceBundleManager.java Fri Jan  6 15:03:17 2012
@@ -42,7 +42,7 @@ public class ResourceBundleManager imple
 
     private final ResourceBundleCache consoleResourceBundleCache;
 
-    private final Map<Long, ResourceBundleCache> resourceBundleCaches;
+    private final Map resourceBundleCaches;
 
 
     /**
@@ -54,7 +54,7 @@ public class ResourceBundleManager imple
     {
         this.bundleContext = bundleContext;
         this.consoleResourceBundleCache = new ResourceBundleCache( bundleContext.getBundle() );
-        this.resourceBundleCaches = new HashMap<Long, ResourceBundleCache>();
+        this.resourceBundleCaches = new HashMap();
 
         bundleContext.addBundleListener( this );
     }
@@ -75,7 +75,7 @@ public class ResourceBundleManager imple
      *
      * @param provider the bundle, provider of the resources
      * @param locale the requested locale.
-     * @return the resource bundle - if not bundle with the requested locale exists,
+     * @return the resource bundle - if not bundle with the requested locale exists, 
      *   the default locale is used.
      */
     public ResourceBundle getResourceBundle( final Bundle provider, final Locale locale )
@@ -92,7 +92,7 @@ public class ResourceBundleManager imple
         synchronized ( resourceBundleCaches )
         {
             Long key = new Long( provider.getBundleId() );
-            cache = resourceBundleCaches.get( key );
+            cache = ( ResourceBundleCache ) resourceBundleCaches.get( key );
             if ( cache == null )
             {
                 cache = new ResourceBundleCache( provider );

Modified: felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/misc/ConfigurationPrinterAdapter.java
URL: http://svn.apache.org/viewvc/felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/misc/ConfigurationPrinterAdapter.java?rev=1228221&r1=1228220&r2=1228221&view=diff
==============================================================================
--- felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/misc/ConfigurationPrinterAdapter.java (original)
+++ felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/misc/ConfigurationPrinterAdapter.java Fri Jan  6 15:03:17 2012
@@ -41,7 +41,7 @@ public class ConfigurationPrinterAdapter
     private Method attachmentMethod;
     private boolean checkedAttachmentMethod = false;
 
-    private static final List<String> CUSTOM_MODES = new ArrayList<String>();
+    private static final List CUSTOM_MODES = new ArrayList();
     static
     {
         CUSTOM_MODES.add( ConfigurationPrinter.MODE_TXT );
@@ -49,7 +49,6 @@ public class ConfigurationPrinterAdapter
         CUSTOM_MODES.add( ConfigurationPrinter.MODE_ZIP );
     }
 
-    @SuppressWarnings("deprecation")
     public static ConfigurationPrinterAdapter createAdapter(
             final Object service,
             final ServiceReference ref)
@@ -259,7 +258,7 @@ public class ConfigurationPrinterAdapter
     /**
      * Search a method with the given name and signature
      */
-    private static Method searchMethod(final Object obj, final String mName, final Class<?>[] params)
+    private static Method searchMethod(final Object obj, final String mName, final Class[] params)
     {
         try
         {

Modified: felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/misc/ConfigurationRender.java
URL: http://svn.apache.org/viewvc/felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/misc/ConfigurationRender.java?rev=1228221&r1=1228220&r2=1228221&view=diff
==============================================================================
--- felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/misc/ConfigurationRender.java (original)
+++ felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/misc/ConfigurationRender.java Fri Jan  6 15:03:17 2012
@@ -42,7 +42,6 @@ import org.osgi.util.tracker.ServiceTrac
  * representation of the current framework status. The content itself is
  *  internally generated by the {@link ConfigurationPrinter} plugins.
  */
-@SuppressWarnings("serial")
 public class ConfigurationRender extends SimpleWebConsolePlugin implements OsgiManagerPlugin
 {
 
@@ -69,7 +68,7 @@ public class ConfigurationRender extends
 
     private int cfgPrinterTrackerCount;
 
-    private ArrayList<ConfigurationPrinterAdapter> configurationPrinters;
+    private ArrayList configurationPrinters;
 
     /** Default constructor */
     public ConfigurationRender( final ResourceBundleManager resourceBundleManager )
@@ -157,12 +156,12 @@ public class ConfigurationRender extends
             pw.println ( "<html xmlns=\"http://www.w3.org/1999/xhtml\">" );
             pw.println ( "<head><title>dummy</title></head><body><div>" );
 
-            Collection<ConfigurationPrinterAdapter> printers = getPrintersForLabel(name);
+            Collection printers = getPrintersForLabel(name);
             if ( printers != null )
             {
-                for (Iterator<ConfigurationPrinterAdapter> i = printers.iterator(); i.hasNext();)
+                for (Iterator i = printers.iterator(); i.hasNext();)
                 {
-                    final ConfigurationPrinterAdapter desc = i.next();
+                    final ConfigurationPrinterAdapter desc = (ConfigurationPrinterAdapter) i.next();
                     pw.enableFilter( desc.escapeHtml() );
                     printConfigurationPrinter( pw, desc, ConfigurationPrinter.MODE_WEB );
                     pw.enableFilter( false );
@@ -212,14 +211,15 @@ public class ConfigurationRender extends
 
         // print headers only
         final String pluginRoot = request.getAttribute( WebConsoleConstants.ATTR_PLUGIN_ROOT ) + "/";
-        for ( final ConfigurationPrinterAdapter desc : getConfigurationPrinters() )
+        Collection printers = getConfigurationPrinters();
+        for (Iterator i = printers.iterator(); i.hasNext();)
         {
+            final ConfigurationPrinterAdapter desc = (ConfigurationPrinterAdapter) i.next();
             if ( desc.match( ConfigurationPrinter.MODE_WEB ) )
             {
                 final String label = desc.label;
                 final String title = desc.title;
-                pw.print( "<li><a href='" + pluginRoot + URLEncoder.encode( label, "utf-8" ) + ".nfo'>" + title
-                    + "</a></li>" );
+                pw.print("<li><a href='" + pluginRoot + URLEncoder.encode(label) + ".nfo'>" + title + "</a></li>" );
             }
         }
         pw.println("</ul> <!-- end tabs on top -->");
@@ -232,17 +232,17 @@ public class ConfigurationRender extends
         pw.flush();
     }
 
-    private List<ConfigurationPrinterAdapter> getPrintersForLabel(final String label)
+    private List getPrintersForLabel(final String label)
     {
-        List<ConfigurationPrinterAdapter> list = null;
-        for ( Iterator<ConfigurationPrinterAdapter> cpi = getConfigurationPrinters().iterator(); cpi.hasNext(); )
+        List list = null;
+        for ( Iterator cpi = getConfigurationPrinters().iterator(); cpi.hasNext(); )
         {
-            final ConfigurationPrinterAdapter desc = cpi.next();
+            final ConfigurationPrinterAdapter desc = (ConfigurationPrinterAdapter) cpi.next();
             if (desc.label.equals( label ) )
             {
                 if ( list == null )
                 {
-                    list = new ArrayList<ConfigurationPrinterAdapter>();
+                    list = new ArrayList();
                     list.add(desc);
                 }
             }
@@ -253,16 +253,16 @@ public class ConfigurationRender extends
     private void printConfigurationStatus( ConfigurationWriter pw, final String mode, final String optionalLabel )
     {
         // check if we have printers for that label
-        Collection<ConfigurationPrinterAdapter> printers = getPrintersForLabel(optionalLabel);
+        Collection printers = getPrintersForLabel(optionalLabel);
         if ( printers == null )
         {
             // if not use all
             printers = getConfigurationPrinters();
         }
 
-        for ( Iterator<ConfigurationPrinterAdapter> cpi = printers.iterator(); cpi.hasNext(); )
+        for ( Iterator cpi = printers.iterator(); cpi.hasNext(); )
         {
-            final ConfigurationPrinterAdapter desc = cpi.next();
+            final ConfigurationPrinterAdapter desc = (ConfigurationPrinterAdapter) cpi.next();
             if ( desc.match(mode) )
             {
                 printConfigurationPrinter( pw, desc, mode );
@@ -270,7 +270,7 @@ public class ConfigurationRender extends
         }
     }
 
-    private final synchronized List<ConfigurationPrinterAdapter> getConfigurationPrinters()
+    private final synchronized List getConfigurationPrinters()
     {
         if ( cfgPrinterTracker == null )
         {
@@ -293,7 +293,7 @@ public class ConfigurationRender extends
 
         if ( cfgPrinterTrackerCount != cfgPrinterTracker.getTrackingCount() )
         {
-            SortedMap<String, ConfigurationPrinterAdapter> cp = new TreeMap<String, ConfigurationPrinterAdapter>();
+            SortedMap cp = new TreeMap();
             ServiceReference[] refs = cfgPrinterTracker.getServiceReferences();
             if ( refs != null )
             {
@@ -311,7 +311,7 @@ public class ConfigurationRender extends
                     }
                 }
             }
-            configurationPrinters = new ArrayList<ConfigurationPrinterAdapter>(cp.values());
+            configurationPrinters = new ArrayList(cp.values());
             cfgPrinterTrackerCount = cfgPrinterTracker.getTrackingCount();
         }
 
@@ -319,7 +319,7 @@ public class ConfigurationRender extends
     }
 
 
-    private final void addConfigurationPrinter( final SortedMap<String, ConfigurationPrinterAdapter> printers,
+    private final void addConfigurationPrinter( final SortedMap printers,
             final ConfigurationPrinterAdapter desc,
             final Bundle provider)
     {
@@ -455,7 +455,6 @@ public class ConfigurationRender extends
         abstract void end();
 
 
-        @SuppressWarnings("unused")
         public void handleAttachments( final String title, final URL[] urls ) throws IOException
         {
             throw new UnsupportedOperationException( "handleAttachments not supported by this configuration writer: "
@@ -557,17 +556,20 @@ public class ConfigurationRender extends
     private void addAttachments( final ConfigurationWriter cf, final String mode )
     throws IOException
     {
-        for ( final ConfigurationPrinterAdapter desc : getConfigurationPrinters() )
+        for ( Iterator cpi = getConfigurationPrinters().iterator(); cpi.hasNext(); )
         {
-            if ( desc.match( mode ) )
+            // check if printer supports zip mode
+            final ConfigurationPrinterAdapter desc = (ConfigurationPrinterAdapter) cpi.next();
+            if ( desc.match(mode) )
             {
-                final URL[] attachments = desc.getAttachments( mode );
+                final URL[] attachments = desc.getAttachments(mode);
                 if ( attachments != null )
                 {
                     cf.handleAttachments( desc.title, attachments );
                 }
             }
         }
+
     }
 
     private static class PlainTextConfigurationWriter extends ConfigurationWriter

Modified: felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/misc/LicenseServlet.java
URL: http://svn.apache.org/viewvc/felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/misc/LicenseServlet.java?rev=1228221&r1=1228220&r2=1228221&view=diff
==============================================================================
--- felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/misc/LicenseServlet.java (original)
+++ felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/misc/LicenseServlet.java Fri Jan  6 15:03:17 2012
@@ -51,7 +51,6 @@ import org.osgi.framework.Bundle;
  *
  * TODO: add support for 'Bundle-License' manifest header
  */
-@SuppressWarnings("serial")
 public final class LicenseServlet extends SimpleWebConsolePlugin implements OsgiManagerPlugin
 {
     // common names (without extension) of the license files.
@@ -192,13 +191,12 @@ public final class LicenseServlet extend
 
         for ( int i = 0; i < patterns.length; i++ )
         {
-            @SuppressWarnings("unchecked")
-            Enumeration<URL> entries = bundle.findEntries( "/", patterns[i] + "*", true );
+            Enumeration entries = bundle.findEntries( "/", patterns[i] + "*", true );
             if ( entries != null )
             {
                 while ( entries.hasMoreElements() )
                 {
-                    URL url = entries.nextElement();
+                    URL url = ( URL ) entries.nextElement();
                     JSONObject entry = new JSONObject();
                     entry.put( "path", url.getPath() );
                     entry.put( "url", getName( url.getPath() ) );
@@ -207,13 +205,12 @@ public final class LicenseServlet extend
             }
         }
 
-        @SuppressWarnings("unchecked")
-        Enumeration<URL> entries = bundle.findEntries( "/", "*.jar", true );
+        Enumeration entries = bundle.findEntries( "/", "*.jar", true );
         if ( entries != null )
         {
             while ( entries.hasMoreElements() )
             {
-                URL url = entries.nextElement();
+                URL url = ( URL ) entries.nextElement();
                 final String resName = getName( url.getPath() );
 
                 InputStream ins = null;

Modified: felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/misc/SystemPropertiesPrinter.java
URL: http://svn.apache.org/viewvc/felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/misc/SystemPropertiesPrinter.java?rev=1228221&r1=1228220&r2=1228221&view=diff
==============================================================================
--- felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/misc/SystemPropertiesPrinter.java (original)
+++ felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/misc/SystemPropertiesPrinter.java Fri Jan  6 15:03:17 2012
@@ -33,7 +33,6 @@ public class SystemPropertiesPrinter ext
 
     private static final String TITLE = "System Properties";
 
-    @SuppressWarnings("unused")
     private static final String LABEL = "_systemproperties";
 
 
@@ -46,12 +45,13 @@ public class SystemPropertiesPrinter ext
     public void printConfiguration( PrintWriter printWriter )
     {
         Properties props = System.getProperties();
-        SortedSet<Object> keys = new TreeSet<Object>( props.keySet() );
-        for ( Iterator<Object> ki = keys.iterator(); ki.hasNext(); )
+        SortedSet keys = new TreeSet( props.keySet() );
+        for ( Iterator ki = keys.iterator(); ki.hasNext(); )
         {
             Object key = ki.next();
             ConfigurationRender.infoLine( printWriter, null, ( String ) key, props.get( key ) );
         }
+
     }
 
 }
\ No newline at end of file

Modified: felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/misc/ThreadPrinter.java
URL: http://svn.apache.org/viewvc/felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/misc/ThreadPrinter.java?rev=1228221&r1=1228220&r2=1228221&view=diff
==============================================================================
--- felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/misc/ThreadPrinter.java (original)
+++ felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/misc/ThreadPrinter.java Fri Jan  6 15:03:17 2012
@@ -29,7 +29,6 @@ public class ThreadPrinter extends Abstr
 
     private static final String TITLE = "Threads";
 
-    @SuppressWarnings("unused")
     private static final String LABEL = "_threads";
 
 



Mime
View raw message