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/31 11:36:15 UTC
svn commit: r607715 -
/incubator/sling/trunk/osgi/console-web/src/main/java/org/apache/sling/osgi/console/web/internal/ConfigurationRender.java
Author: cziegeler
Date: Mon Dec 31 02:36:15 2007
New Revision: 607715
URL: http://svn.apache.org/viewvc?rev=607715&view=rev
Log:
Use generics.
Modified:
incubator/sling/trunk/osgi/console-web/src/main/java/org/apache/sling/osgi/console/web/internal/ConfigurationRender.java
Modified: incubator/sling/trunk/osgi/console-web/src/main/java/org/apache/sling/osgi/console/web/internal/ConfigurationRender.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/osgi/console-web/src/main/java/org/apache/sling/osgi/console/web/internal/ConfigurationRender.java?rev=607715&r1=607714&r2=607715&view=diff
==============================================================================
--- incubator/sling/trunk/osgi/console-web/src/main/java/org/apache/sling/osgi/console/web/internal/ConfigurationRender.java (original)
+++ incubator/sling/trunk/osgi/console-web/src/main/java/org/apache/sling/osgi/console/web/internal/ConfigurationRender.java Mon Dec 31 02:36:15 2007
@@ -335,15 +335,16 @@
: "Unbound";
this.infoLine(pw, " ", "BundleLocation", loc);
- Dictionary props = config.getProperties();
+ @SuppressWarnings("unchecked")
+ Dictionary<String, Object> props = config.getProperties();
if (props != null) {
- SortedSet keys = new TreeSet();
- for (Enumeration ke = props.keys(); ke.hasMoreElements();) {
+ SortedSet<String> keys = new TreeSet<String>();
+ for (Enumeration<String> ke = props.keys(); ke.hasMoreElements();) {
keys.add(ke.nextElement());
}
- for (Iterator ki = keys.iterator(); ki.hasNext();) {
- String key = (String) ki.next();
+ for (Iterator<String> ki = keys.iterator(); ki.hasNext();) {
+ String key = ki.next();
this.infoLine(pw, " ", key, props.get(key));
}
}
@@ -401,7 +402,8 @@
buf.append(bundle.getBundleId());
}
- Dictionary headers = bundle.getHeaders();
+ @SuppressWarnings("unchecked")
+ Dictionary<String, String> headers = bundle.getHeaders();
if (headers.get(Constants.BUNDLE_VERSION) != null) {
buf.append(" (").append(headers.get(Constants.BUNDLE_VERSION)).append(
')');