Author: sebb Date: Fri Jan 16 01:04:02 2015 New Revision: 1652322 URL: http://svn.apache.org/r1652322 Log: Replace Java 6+ method call
Modified: commons/proper/net/trunk/src/test/java/examples/MainTest.java Modified: commons/proper/net/trunk/src/test/java/examples/MainTest.java URL: http://svn.apache.org/viewvc/commons/proper/net/trunk/src/test/java/examples/MainTest.java?rev=1652322&r1=1652321&r2=1652322&view=diff ============================================================================== --- commons/proper/net/trunk/src/test/java/examples/MainTest.java (original) +++ commons/proper/net/trunk/src/test/java/examples/MainTest.java Fri Jan 16 01:04:02 2015 @@ -19,7 +19,10 @@ public class MainTest { Properties cp = scanClasses(); Properties fp = new Properties(); fp.load(this.getClass().getResourceAsStream("examples.properties")); - for(String c : cp.stringPropertyNames()) { + @SuppressWarnings("unchecked") // OK + final Enumeration<String> propertyNames = (Enumeration<String>) cp.propertyNames(); + while(propertyNames.hasMoreElements()){ + String c = propertyNames.nextElement(); String fv = fp.getProperty(c); final String cv = cp.getProperty(c); if (fv == null) {