Something like this would be a bit more readable:
```scala
for (driver <- DriverManager.getDrivers.toSeq if driver.isInstanceOf[ProxyDriver]) {
  DriverManager.deregisterDriver(driver)
}
```