From 5da0b18ff5af92e10159fb00e3519207a275d839 Mon Sep 17 00:00:00 2001 From: lukaseder Date: Fri, 19 Oct 2018 17:47:10 +0200 Subject: [PATCH] [#7954] Document in Javadoc that JDBCUtils.dialect() and similar methods return DEFAULT, not null --- jOOQ/src/main/java/org/jooq/tools/jdbc/JDBCUtils.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/jOOQ/src/main/java/org/jooq/tools/jdbc/JDBCUtils.java b/jOOQ/src/main/java/org/jooq/tools/jdbc/JDBCUtils.java index 40cfa8907f..71a3fb218f 100644 --- a/jOOQ/src/main/java/org/jooq/tools/jdbc/JDBCUtils.java +++ b/jOOQ/src/main/java/org/jooq/tools/jdbc/JDBCUtils.java @@ -114,6 +114,9 @@ public class JDBCUtils { * the URL (e.g. when using an JDBC-ODBC bridge), further actions may be * implemented in the future. * + * @return The appropriate {@link SQLDialect} or {@link SQLDialect#DEFAULT} + * if no dialect could be derived from the connection. Never + * null. * @see #dialect(String) */ public static final SQLDialect dialect(Connection connection) { @@ -270,6 +273,10 @@ public class JDBCUtils { /** * "Guess" the {@link SQLDialect} from a connection URL. + * + * @return The appropriate {@link SQLDialect} or {@link SQLDialect#DEFAULT} + * if no dialect could be derived from the connection. Never + * null. */ public static final SQLDialect dialect(String url) { if (url == null) @@ -344,6 +351,10 @@ public class JDBCUtils { /** * "Guess" the JDBC driver from a connection URL. + * + * @return The appropriate JDBC driver class or + * "java.sql.Driver" if no driver class could be + * derived from the URL. Never null. */ public static final String driver(String url) { switch (dialect(url).family()) {