7034656: Address lint warnings for DriverManager
authorlancea
Thu, 07 Apr 2011 11:25:09 -0400
changeset 9243 d7a77bce0742
parent 9242 ef138d47df58
child 9244 84d85c90d5db
7034656: Address lint warnings for DriverManager Reviewed-by: alanb, forax, ohair
jdk/src/share/classes/java/sql/DriverManager.java
--- a/jdk/src/share/classes/java/sql/DriverManager.java	Thu Apr 07 15:06:32 2011 +0100
+++ b/jdk/src/share/classes/java/sql/DriverManager.java	Thu Apr 07 11:25:09 2011 -0400
@@ -483,8 +483,8 @@
     private static void loadInitialDrivers() {
         String drivers;
         try {
-            drivers = (String)  AccessController.doPrivileged(new PrivilegedAction() {
-                public Object run() {
+            drivers = AccessController.doPrivileged(new PrivilegedAction<String>() {
+                public String run() {
                     return System.getProperty("jdbc.drivers");
                 }
             });
@@ -496,8 +496,8 @@
         // exposed as a java.sql.Driver.class service.
         // ServiceLoader.load() replaces the sun.misc.Providers()
 
-        AccessController.doPrivileged(new PrivilegedAction() {
-            public Object run() {
+        AccessController.doPrivileged(new PrivilegedAction<Void>() {
+            public Void run() {
 
                 ServiceLoader<Driver> loadedDrivers = ServiceLoader.load(Driver.class);
                 Iterator driversIterator = loadedDrivers.iterator();