Author: oheger
Date: Fri Feb 5 21:01:02 2010
New Revision: 907088
URL: http://svn.apache.org/viewvc?rev=907088&view=rev
Log:
Removed reference to HierarchicalConfiguration and some raw type warnings.
Modified:
commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/HierarchicalConfigurationConverter.java
Modified:
commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/HierarchicalConfigurationConverter.java
URL:
http://svn.apache.org/viewvc/commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/HierarchicalConfigurationConverter.java?rev=907088&r1=907087&r2=907088&view=diff
==============================================================================
---
commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/HierarchicalConfigurationConverter.java
(original)
+++
commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/HierarchicalConfigurationConverter.java
Fri Feb 5 21:01:02 2010
@@ -34,12 +34,14 @@
* the keys in the original configuration.</p>
* <p>Concrete sub classes will implement event handlers that generate SAX
* events for XML processing or construct a
- * <code>HierarchicalConfiguration</code> root node. All in all with this class
+ * root node for a hierarchical configuration. All in all, with this class
* it is possible to treat a default configuration as if it was a hierarchical
* configuration, which can be sometimes useful.</p>
- * @see HierarchicalConfiguration
+ * @see AbstractHierarchicalConfiguration
*
- * @author <a href="mailto:[email protected]">Oliver Heger</a>
+ * @author <a
+ *
href="http://commons.apache.org/configuration/team-list.html">Commons
+ * Configuration team</a>
* @version $Id$
*/
abstract class HierarchicalConfigurationConverter
@@ -61,7 +63,7 @@
ConfigurationKey keyLast = keyEmpty;
Set<String> keySet = new HashSet<String>();
- for (Iterator it = config.getKeys(); it.hasNext();)
+ for (Iterator<String> it = config.getKeys(); it.hasNext();)
{
String key = (String) it.next();
if (keySet.contains(key))
@@ -115,7 +117,7 @@
protected void closeElements(ConfigurationKey keyLast, ConfigurationKey
keyAct)
{
ConfigurationKey keyDiff = keyAct.differenceKey(keyLast);
- Iterator it = reverseIterator(keyDiff);
+ Iterator<String> it = reverseIterator(keyDiff);
if (it.hasNext())
{
// Skip first because it has already been closed by fireValue()
@@ -136,7 +138,7 @@
* @param key the key
* @return a reverse iterator for the parts of this key
*/
- protected Iterator reverseIterator(ConfigurationKey key)
+ protected Iterator<String> reverseIterator(ConfigurationKey key)
{
List<String> list = new ArrayList<String>();
for (String k : key.iterator())
@@ -184,9 +186,9 @@
*/
protected void fireValue(String name, Object value)
{
- if (value != null && value instanceof Collection)
+ if (value != null && value instanceof Collection<?>)
{
- for (Object element : ((Collection) value))
+ for (Object element : ((Collection<?>) value))
{
fireValue(name, element);
}