[quote user="brill"][quote user="ammoQ"][quote user="brill"]And yes, the throws SQLException is a WTF because it has nothing to do with the test (I don't think that method even throws it) and it's clearly a copy & paste job.
[/quote]
Supposing that databaseMetaData is an object that supports the inteface DatabaseMetaData, the method supportsResultSetConcurrency can throw SQLException according to the specification, though it's unlikely that any implementation would ever do that.
[/quote]I guess it would depend on the implementation as to why one would be thrown. for instance most implementations I've seen simply return a true/false depending on support, but its possible that an impl might go back to the DB to check. [/quote]I think in JDBC nearly every single method of every single interface is allowed to throw SQLException, because the creators of the JDBC specifications did not want to restrict implementations in doing so. Of course catching all those never-thrown-in-this-life exceptions makes programs ugly; that's one reason why C# handles it differenty. (Exceptions do not have to be caught or declared)I guess I should have checked the javadocs, particularly in this forum!Definitely ;-)