String name = rs.getString(3);
String type = rs.getString(4);
if (TABLE.equals(type)) {
return new DatabaseTable(name, schema);
} else if (VIEW.equals(type)) {
return new DatabaseView(name, schema);
}
// XXX: I'd like to throw a RuntimeException here, but that would change the behavior
// of the code and I don't want to do that so close to release.
// When (if...) we make that change we can get rid of the check-for-null in the calling
// method.