7034656: Address lint warnings for DriverManager
Reviewed-by: alanb, forax, ohair
--- 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();