Author: ozizka(a)redhat.com
Date: 2009-03-13 13:22:56 -0400 (Fri, 13 Mar 2009)
New Revision: 219
Modified:
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/util/EmbJoprTestToolkit.java
Log:
stringPropertyNames() removed
Modified: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/util/EmbJoprTestToolkit.java
===================================================================
---
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/util/EmbJoprTestToolkit.java 2009-03-13
16:03:15 UTC (rev 218)
+++
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/util/EmbJoprTestToolkit.java 2009-03-13
17:22:56 UTC (rev 219)
@@ -1050,7 +1050,16 @@
public static Map<String,String> propertiesAsMap( Properties props )
{
Map<String,String> map = new HashMap<String,String>(props.size());
- for( String propName : props.stringPropertyNames() ) {
+
+ // Get Properties names.
+ //Set<String> propnames = props.stringPropertyNames();// JDK 1.6
+ Set<String> propNames = new HashSet<String>();
+ Enumeration<?> propNamesIter = props.propertyNames();
+ while( propNamesIter.hasMoreElements() )
+ propNames.add( (String)propNamesIter.nextElement());
+
+ // Put all properties into the map.
+ for( String propName : propNames ) {
map.put(propName, props.getProperty(propName));
}
return map;
Show replies by date