From c187b144b15b6d7563f46961df6aabe0fba5ce02 Mon Sep 17 00:00:00 2001 From: lancea Date: Thu, 7 Apr 2011 11:25:09 -0400 Subject: [PATCH] 7034656: Address lint warnings for DriverManager Reviewed-by: alanb, forax, ohair --- src/share/classes/java/sql/DriverManager.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/share/classes/java/sql/DriverManager.java b/src/share/classes/java/sql/DriverManager.java index e6732a3df..4864eb2cc 100644 --- a/src/share/classes/java/sql/DriverManager.java +++ b/src/share/classes/java/sql/DriverManager.java @@ -483,8 +483,8 @@ public class DriverManager { private static void loadInitialDrivers() { String drivers; try { - drivers = (String) AccessController.doPrivileged(new PrivilegedAction() { - public Object run() { + drivers = AccessController.doPrivileged(new PrivilegedAction() { + public String run() { return System.getProperty("jdbc.drivers"); } }); @@ -496,8 +496,8 @@ public class DriverManager { // 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() { + public Void run() { ServiceLoader loadedDrivers = ServiceLoader.load(Driver.class); Iterator driversIterator = loadedDrivers.iterator(); -- GitLab