db-jdo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c..@apache.org
Subject svn commit: r723902 - in /db/jdo/trunk/api2/test/java/javax/jdo: identity/ObjectIdentityTest.java util/XMLTestUtil.java
Date Fri, 05 Dec 2008 22:22:07 GMT
Author: clr
Date: Fri Dec  5 14:22:07 2008
New Revision: 723902

URL: http://svn.apache.org/viewvc?rev=723902&view=rev
Log:
fix Java 5 unchecked call warnings

Modified:
    db/jdo/trunk/api2/test/java/javax/jdo/identity/ObjectIdentityTest.java
    db/jdo/trunk/api2/test/java/javax/jdo/util/XMLTestUtil.java

Modified: db/jdo/trunk/api2/test/java/javax/jdo/identity/ObjectIdentityTest.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/api2/test/java/javax/jdo/identity/ObjectIdentityTest.java?rev=723902&r1=723901&r2=723902&view=diff
==============================================================================
--- db/jdo/trunk/api2/test/java/javax/jdo/identity/ObjectIdentityTest.java (original)
+++ db/jdo/trunk/api2/test/java/javax/jdo/identity/ObjectIdentityTest.java Fri Dec  5 14:22:07
2008
@@ -55,8 +55,8 @@
      */
     private static JDOImplHelper helper = (JDOImplHelper)
         AccessController.doPrivileged(
-            new PrivilegedAction () {
-                public Object run () {
+            new PrivilegedAction<JDOImplHelper> () {
+                public JDOImplHelper run () {
                     return JDOImplHelper.getInstance();
                 }
             }

Modified: db/jdo/trunk/api2/test/java/javax/jdo/util/XMLTestUtil.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/api2/test/java/javax/jdo/util/XMLTestUtil.java?rev=723902&r1=723901&r2=723902&view=diff
==============================================================================
--- db/jdo/trunk/api2/test/java/javax/jdo/util/XMLTestUtil.java (original)
+++ db/jdo/trunk/api2/test/java/javax/jdo/util/XMLTestUtil.java Fri Dec  5 14:22:07 2008
@@ -303,7 +303,7 @@
                 try {
                     BufferedReader bufferedReader =
                         new BufferedReader(new FileReader(fileUnderTest));
-                    ArrayList tmp = new ArrayList();
+                    ArrayList<String> tmp = new ArrayList<String>();
                     while (bufferedReader.ready()) {
                         tmp.add(bufferedReader.readLine());
                     }
@@ -381,8 +381,8 @@
         private static final String JDOQUERY_DTD_FILENAME = 
             "javax/jdo/jdoquery_2_2.dtd";
 
-        static Map publicIds = new HashMap();
-        static Map systemIds = new HashMap();
+        static Map<String,String> publicIds = new HashMap<String,String>();
+        static Map<String,String> systemIds = new HashMap<String,String>();
         static {
             publicIds.put(RECOGNIZED_JDO_PUBLIC_ID, JDO_DTD_FILENAME);
             publicIds.put(RECOGNIZED_ORM_PUBLIC_ID, ORM_DTD_FILENAME);
@@ -410,9 +410,9 @@
                 // but only if the publicId is equal to RECOGNIZED_PUBLIC_ID
                 // or there is no publicID and the systemID is equal to
                 // RECOGNIZED_SYSTEM_ID. 
-                    InputStream stream = (InputStream) AccessController.doPrivileged (
-                        new PrivilegedAction () {
-                            public Object run () {
+                    InputStream stream = AccessController.doPrivileged (
+                        new PrivilegedAction<InputStream> () {
+                            public InputStream run () {
                             return getClass().getClassLoader().
                                 getResourceAsStream(finalName);
                             }
@@ -433,7 +433,7 @@
     /** Helper class to find all test JDO metadata files. */
     public static class XMLFinder {
 
-        private List metadataFiles = new ArrayList();
+        private List<File> metadataFiles = new ArrayList<File>();
         private final boolean recursive;
         
         /** Constructor. */
@@ -504,7 +504,7 @@
         String[] ret = null;
         String metadata = System.getProperty(METADATA_PROP);
         if ((metadata != null) && (metadata.length() > 0)) {
-            List entries = new ArrayList();
+            List<String> entries = new ArrayList<String>();
             StringTokenizer st = new StringTokenizer(metadata, DELIM);
             while (st.hasMoreTokens()) {
                 entries.add(st.nextToken());



Mime
View raw message