I get the following 3 warnings when running maven in tck20 project. I have installed jdk 1.5 .  I am attaching a patch for it.

java:compile:
    [echo] Compiling to /home/karan/Projects/jdo/trunk/tck20/target/classes
    [javac] Compiling 491 source files to /home/karan/Projects/jdo/trunk/tck20/target/classes
/home/karan/Projects/jdo/trunk/tck20/test/java/org/apache/jdo/tck/enhancement/EnhancerTest.java:74: warning: as of release 1.5, 'enum' is a keyword, and may not be used as an identifier
(try -source 1.5 to use 'enum' as a keyword)
        Enumeration enum = classesToTest.propertyNames();
                    ^
/home/karan/Projects/jdo/trunk/tck20/test/java/org/apache/jdo/tck/enhancement/EnhancerTest.java:79: warning: as of release 1.5, 'enum' is a keyword, and may not be used as an identifier
(try -source 1.5 to use 'enum' as a keyword)
        while (enum.hasMoreElements()) {
               ^
/home/karan/Projects/jdo/trunk/tck20/test/java/org/apache/jdo/tck/enhancement/EnhancerTest.java:81: warning: as of release 1.5, 'enum' is a keyword, and may not be used as an identifier
(try -source 1.5 to use 'enum' as a keyword)
            String packageName = (String) enum.nextElement();
                                          ^
Note: /home/karan/Projects/jdo/trunk/tck20/test/java/org/apache/jdo/tck/util/SwingTestRunner.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
3 warnings


--
Karan Malhi


Index: test/java/org/apache/jdo/tck/enhancement/EnhancerTest.java
===================================================================
--- test/java/org/apache/jdo/tck/enhancement/EnhancerTest.java	(revision 230513)
+++ test/java/org/apache/jdo/tck/enhancement/EnhancerTest.java	(working copy)
@@ -71,14 +71,14 @@
          */
         Properties classesToTest = getProperties("enhancement-test.properties"); //NOI18N
         
-        Enumeration enum = classesToTest.propertyNames();
+        Enumeration enumeration = classesToTest.propertyNames();
         int numberOfPackages = 0;
         
         /** Each key is a package name; the value is a list of class names to test.
          */
-        while (enum.hasMoreElements()) {
+        while (enumeration.hasMoreElements()) {
             ++numberOfPackages;
-            String packageName = (String) enum.nextElement();
+            String packageName = (String) enumeration.nextElement();
             if (debug) logger.debug("EnhancerTest Package: " + packageName);
             String classNames = (String) classesToTest.get(packageName);
             if (debug) logger.debug("EnhancerTest Classes: " + classNames);

Reply via email to