forked from phoedos/pmd
923815c01e
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@1346 51baf565-9d33-0410-a72c-fc3788e3496d
18 lines
575 B
Plaintext
18 lines
575 B
Plaintext
for (Iterator i = databases.iterator(); i.hasNext();) {
|
|
try {
|
|
Database db = (Database) i.next();
|
|
if (!db.getDriver().equals("")) {
|
|
Class driverClass = Thread.currentThread().getContextClassLoader().
|
|
loadClass( db.getDriver() );
|
|
DriverManager.registerDriver( (Driver) driverClass.newInstance() );
|
|
}
|
|
|
|
JDBCReportListener listener =
|
|
new JDBCReportListener( db.getUrl(), db.getUser(),
|
|
db.getPassword(), db.getProjectId() );
|
|
report.addListener( listener );
|
|
} catch (Exception ex) {
|
|
throw new BuildException( ex );
|
|
}
|
|
}
|